예제 #1
0
 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);
 }
예제 #2
0
 public function exampleFinished(\PHPSpec\Specification\Example $example)
 {
     $this->notify(new ReporterEvent('exampleFinish', '', $example->getSpecificationText()));
 }
예제 #3
0
파일: Progress.php 프로젝트: nrocy/phpspec
    /**
     * 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;
    }
예제 #4
0
파일: Reporter.php 프로젝트: nrocy/phpspec
 /**
  * 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()));
 }