示例#1
0
 public function __construct(Factory $factory)
 {
     parent::__construct($factory);
     $this->injector = new Injector($factory, function ($class) use($factory) {
         return (new Mockster($class, $factory))->__mock();
     });
     $this->injector->setThrowWhenCantInjectProperty(false);
     $returnTrue = function () {
         return true;
     };
     $this->setParameterFilter($returnTrue);
     $this->setPropertyFilter($returnTrue);
     $this->setAnnotationFilter($returnTrue);
 }
示例#2
0
 function __construct(Specification $spec, Factory $factory)
 {
     parent::__construct($factory);
     $this->factory = $factory;
     $this->spec = $spec;
 }