public function PHPUnit_Util_TestDox_ResultPrinter::startTest in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php \PHPUnit_Util_TestDox_ResultPrinter::startTest()
 
A test started.
Parameters
PHPUnit_Framework_Test $test:
Overrides PHPUnit_Framework_TestListener::startTest
File
- vendor/
phpunit/ phpunit/ src/ Util/ TestDox/ ResultPrinter.php, line 209  
Class
- PHPUnit_Util_TestDox_ResultPrinter
 - Base class for printers of TestDox documentation.
 
Code
public function startTest(PHPUnit_Framework_Test $test) {
  if (!$this
    ->isOfInterest($test)) {
    return;
  }
  $class = get_class($test);
  if ($this->testClass != $class) {
    if ($this->testClass != '') {
      $this
        ->doEndClass();
    }
    $this->currentTestClassPrettified = $this->prettifier
      ->prettifyTestClass($class);
    $this
      ->startClass($class);
    $this->testClass = $class;
    $this->tests = array();
  }
  $prettified = false;
  $annotations = $test
    ->getAnnotations();
  if (isset($annotations['method']['testdox'][0])) {
    $this->currentTestMethodPrettified = $annotations['method']['testdox'][0];
    $prettified = true;
  }
  if (!$prettified) {
    $this->currentTestMethodPrettified = $this->prettifier
      ->prettifyTestMethod($test
      ->getName(false));
  }
  $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
}