shouldStopOnFailure() public method

Check if the suite runner should stop on failure
public shouldStopOnFailure ( ) : boolean
return boolean
Esempio n. 1
0
 /**
  * {@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]);
 }
Esempio n. 2
0
 /**
  * {@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();
 }