Skip to content

Commit

Permalink
Renamed TestFailure::getTestLabel() to getTestName().
Browse files Browse the repository at this point in the history
  • Loading branch information
sun committed Jul 26, 2014
1 parent 5269713 commit 05f331b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/Framework/TestFailure.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class PHPUnit_Framework_TestFailure
/**
* @var string
*/
private $label;
private $testName;

/**
* @var Exception
Expand All @@ -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;
}
Expand All @@ -91,7 +91,7 @@ public function toString()
{
return sprintf(
'%s: %s',
$this->label,
$this->testName,
$this->thrownException->getMessage()
);
}
Expand Down Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/TextUI/ResultPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ protected function printDefectHeader(PHPUnit_Framework_TestFailure $defect, $cou
"\n%d) %s\n",

$count,
$defect->getTestLabel()
$defect->getTestName()
)
);
}
Expand Down

0 comments on commit 05f331b

Please sign in to comment.