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); }
function __construct(Specification $spec, Factory $factory) { parent::__construct($factory); $this->factory = $factory; $this->spec = $spec; }