Exemple #1
0
 /**
  * @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);
     }
 }
Exemple #2
0
 public function flush()
 {
     $this->write(PHP_EOL);
     parent::flush();
 }