public __construct ( callable | null $callback, string | null $label, |
||
$callback | callable | null | The callback, or null to create an anonymous spy. |
$label | string | null | The label. |
$callFactory | The call factory to use. | |
$invoker | The invoker to use. | |
$generatorSpyFactory | The generator spy factory to use. | |
$iterableSpyFactory | The iterable spy factory to use. |
public function __construct($callback, $label, CallFactory $callFactory, Invoker $invoker, GeneratorSpyFactory $generatorSpyFactory, IterableSpyFactory $iterableSpyFactory)
{
parent::__construct($callback, $label);
$this->callFactory = $callFactory;
$this->invoker = $invoker;
$this->generatorSpyFactory = $generatorSpyFactory;
$this->iterableSpyFactory = $iterableSpyFactory;
$this->calls = array();
$this->useGeneratorSpies = true;
$this->useIterableSpies = false;
$this->isRecording = true;
}