예제 #1
0
파일: Story.php 프로젝트: rafeca/Spec-PHP
 /**
  * @param \PHPUnit_Framework_TestSuite $suite
  */
 public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
 {
     static $first = true;
     parent::startTestSuite($suite);
     if ($suite instanceof Spec\TestSuite) {
         // Skip root suite
         if (!$suite->getParent()) {
             return;
         }
         $levels = 0;
         if ($parent = $suite->getParent()) {
             while ($parent = $parent->getParent()) {
                 $levels++;
             }
         }
         $output = "" . $suite->getTitle() . "";
         $output = str_repeat("  ", $levels) . $output;
         if ($this->verbose && !$suite->getParent()->getParent()) {
             $filename = "[" . basename($suite->getFilename()) . "]";
             $output .= ' ' . $filename;
         }
         if ($first) {
             $first = false;
         } else {
             $this->write(PHP_EOL);
         }
         $this->write($output . PHP_EOL);
     }
 }
예제 #2
0
파일: Dots.php 프로젝트: rafeca/Spec-PHP
 public function flush()
 {
     $this->write(PHP_EOL);
     parent::flush();
 }