Skip to content
Browse files

Cleanup.

  • Loading branch information...
1 parent bf67548 commit bc276ff94f9aea24a87f2088ef44577a2ea12e2f @sebastianbergmann committed
Showing with 6 additions and 5 deletions.
  1. +6 −5 PHPUnit/TextUI/ResultPrinter.php
View
11 PHPUnit/TextUI/ResultPrinter.php
@@ -169,7 +169,7 @@ protected function printDefects(array $defects, $count, $type)
/**
* @param PHPUnit_Framework_TestFailure $defect
- * @param integer $count
+ * @param integer $count
* @access protected
*/
protected function printDefect(PHPUnit_Framework_TestFailure $defect, $count)
@@ -180,16 +180,17 @@ protected function printDefect(PHPUnit_Framework_TestFailure $defect, $count)
/**
* @param PHPUnit_Framework_TestFailure $defect
- * @param integer $count
+ * @param integer $count
* @access protected
*/
protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $count)
{
$failedTest = $defect->failedTest();
- $message = '';
if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) {
- $message = $failedTest->toString();
+ $testName = $failedTest->toString();
+ } else {
+ $testName = get_class($failedTest);
}
$this->write(
@@ -197,7 +198,7 @@ protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $cou
"\n%d) %s\n",
$count,
- $message
+ $testName
)
);
}

0 comments on commit bc276ff

Please sign in to comment.
Something went wrong with that request. Please try again.