From 05f331b2241fa225a1173489e7be158eb57600e6 Mon Sep 17 00:00:00 2001 From: sun Date: Sat, 26 Jul 2014 03:59:19 +0200 Subject: [PATCH] Renamed TestFailure::getTestLabel() to getTestName(). --- src/Framework/TestFailure.php | 14 +++++++------- src/TextUI/ResultPrinter.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Framework/TestFailure.php b/src/Framework/TestFailure.php index e75b0af132e..835ea91cad5 100644 --- a/src/Framework/TestFailure.php +++ b/src/Framework/TestFailure.php @@ -59,7 +59,7 @@ class PHPUnit_Framework_TestFailure /** * @var string */ - private $label; + private $testName; /** * @var Exception @@ -75,9 +75,9 @@ class PHPUnit_Framework_TestFailure public function __construct(PHPUnit_Framework_Test $failedTest, Exception $thrownException) { if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) { - $this->label = $failedTest->toString(); + $this->testName = $failedTest->toString(); } else { - $this->label = get_class($failedTest); + $this->testName = get_class($failedTest); } $this->thrownException = $thrownException; } @@ -91,7 +91,7 @@ public function toString() { return sprintf( '%s: %s', - $this->label, + $this->testName, $this->thrownException->getMessage() ); } @@ -138,13 +138,13 @@ public static function exceptionToString(Exception $e) } /** - * Returns the label of the failing test (including data set, if any). + * Returns the name of the failing test (including data set, if any). * * @return string */ - public function getTestLabel() + public function getTestName() { - return $this->label; + return $this->testName; } /** diff --git a/src/TextUI/ResultPrinter.php b/src/TextUI/ResultPrinter.php index 572f51507a0..adf82c2de3b 100644 --- a/src/TextUI/ResultPrinter.php +++ b/src/TextUI/ResultPrinter.php @@ -265,7 +265,7 @@ protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $cou "\n%d) %s\n", $count, - $defect->getTestLabel() + $defect->getTestName() ) ); }