From b3b1c71d673b4d3bedd9a6d966f4c5fda8b2ad81 Mon Sep 17 00:00:00 2001 From: Pete Sloman Date: Mon, 12 Mar 2018 23:10:47 +0000 Subject: [PATCH] src/ResultPrinter/HTML.php: Unique Test Signatures (#10) - add fix for #4 to branch 6.0 --- src/ResultPrinter/HTML.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ResultPrinter/HTML.php b/src/ResultPrinter/HTML.php index ceeb933..95eb536 100644 --- a/src/ResultPrinter/HTML.php +++ b/src/ResultPrinter/HTML.php @@ -123,7 +123,7 @@ public function endTest(\PHPUnit\Framework\Test $test, $time) ); $failures = ''; - $name = Descriptor::getTestSignature($test); + $name = Descriptor::getTestSignatureUnique($test); if (isset($this->failures[$name])) { $failTemplate = new \Text_Template( $this->templatePath . 'fail.html' @@ -236,7 +236,7 @@ protected function endRun() */ public function addError(\PHPUnit\Framework\Test $test, \Exception $e, $time) { - $this->failures[Descriptor::getTestSignature($test)][] = $this->cleanMessage($e); + $this->failures[Descriptor::getTestSignatureUnique($test)][] = $this->cleanMessage($e); parent::addError($test, $e, $time); } @@ -249,10 +249,10 @@ public function addError(\PHPUnit\Framework\Test $test, \Exception $e, $time) */ public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time) { - $this->failures[Descriptor::getTestSignature($test)][] = $this->cleanMessage($e); + $this->failures[Descriptor::getTestSignatureUnique($test)][] = $this->cleanMessage($e); parent::addFailure($test, $e, $time); } - + /** * Starts test. * @@ -260,7 +260,7 @@ public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\Ass */ public function startTest(\PHPUnit\Framework\Test $test) { - $name = Descriptor::getTestSignature($test); + $name = Descriptor::getTestSignatureUnique($test); if (isset($this->failures[$name])) { // test failed in before hook return;