A test started.
PHPUnit_Framework_Test $test:
Overrides PHPUnit_Framework_TestListener::startTest
public function startTest(PHPUnit_Framework_Test $test) {
if (!$test instanceof PHPUnit_Framework_Warning) {
$testCase = $this->document
->createElement('testcase');
$testCase
->setAttribute('name', $test
->getName());
if ($test instanceof PHPUnit_Framework_TestCase) {
$class = new ReflectionClass($test);
$methodName = $test
->getName();
if ($class
->hasMethod($methodName)) {
$method = $class
->getMethod($test
->getName());
$testCase
->setAttribute('class', $class
->getName());
$testCase
->setAttribute('file', $class
->getFileName());
$testCase
->setAttribute('line', $method
->getStartLine());
}
}
$this->currentTestCase = $testCase;
}
}