Skip to content
Permalink
Browse files

Implementing skipped tests message in html reporter

  • Loading branch information...
lorenzo committed May 18, 2010
1 parent f7949d6 commit d7803dc7bfc2befdef918a29e97ff04412954253
@@ -259,6 +259,7 @@ public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $t
* @param float $time
*/
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
$this->paintSkip($e, $test);
}
/**
@@ -265,7 +265,9 @@ public function paintFail($message) {
$context = $message->getTrace();
$realContext = $context[3];
$class = new ReflectionClass($realContext['class']);
if ($class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase') {
$deeper = $class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase';
$deeper = $deeper || !$class->isSubclassOf('PHPUnit_Framework_TestCase');
if ($deeper) {
$realContext = $context[4];
$context = $context[3];
} else {
@@ -342,12 +344,13 @@ public function paintException($exception) {
* Prints the message for skipping tests.
*
* @param string $message Text of skip condition.
* @param PHPUnit_Framework_TestCase $test the test method skipped
* @return void
*/
public function paintSkip($message) {
public function paintSkip($message, $test) {
echo "<li class='skipped'>\n";
echo "<span>Skipped</span> ";
echo $this->_htmlEntities($message);
echo $test->getName() . ': ' . $this->_htmlEntities($message->getMessage());
echo "</li>\n";
}

0 comments on commit d7803dc

Please sign in to comment.
You can’t perform that action at this time.