/** * {@inheritdoc} * * @param TestResult $result */ public function run(TestResult $result) { $this->eventEmitter->on('test.failed', function () { if ($this->configuration->shouldStopOnFailure()) { $this->eventEmitter->emit('suite.halt'); } }); $this->eventEmitter->emit('runner.start'); $this->suite->setEventEmitter($this->eventEmitter); $start = microtime(true); $this->suite->run($result); $this->eventEmitter->emit('runner.end', [microtime(true) - $start]); }
/** * {@inheritdoc} * * @param TestResult $result */ public function run(TestResult $result) { $this->handleErrors(); $this->eventEmitter->on('test.failed', function () { if ($this->configuration->shouldStopOnFailure()) { $this->eventEmitter->emit('suite.halt'); } }); $this->eventEmitter->emit('runner.start'); $this->suite->setEventEmitter($this->eventEmitter); $this->suite->run($result); $this->eventEmitter->emit('runner.end'); restore_error_handler(); }