public function run(\PHPSpec\Runner\Reporter $reporter) { if ($reporter instanceof Reporter && $reporter->checkFailFast()) { return; } if ($this->testTargetRepository->testsOnlySpecifiedMethods() && !$this->testTargetRepository->shouldTreatElementAsTest(get_class($this->getExampleGroup()), $this->getMethodName())) { return; } $reporter->exampleStarted($this); parent::run($reporter); $reporter->exampleFinished($this); }
public function exampleFinished(\PHPSpec\Specification\Example $example) { $this->notify(new ReporterEvent('exampleFinish', '', $example->getSpecificationText())); }
/** * Gets a message for a pending example * * @param integer $increment * @param \PHPSpec\Specification\Result\Pending $pending * @param \PHPSpec\Specification\Example $example * @param boolean $backtrace * @return string */ protected function getMessageForPending($increment, $pending, $example, $backtrace) { return <<<MESSAGE {$this->yellow($example->getDescription())} {$this->grey('# ' . $pending->getMessage())} {$this->grey($pending->prettyTrace(1))} MESSAGE; }
/** * Adds a pass to the formatters * * @param \PHPSpec\Specification\Example $example */ public function addPass(Example $example) { $this->_passing[] = $example; $this->notify(new ReporterEvent('status', '.', $example->getSpecificationText())); }