Skip to content

Commit

Permalink
CodeCov is a harsh mistress
Browse files Browse the repository at this point in the history
  • Loading branch information
epdenouden authored and sebastianbergmann committed Dec 6, 2018
1 parent 092d742 commit 49ff35c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Util/Log/JUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ public function startTest(Test $test): void
*/
public function endTest(Test $test, float $time): void
{
$numAssertions = 0;

if (\method_exists($test, 'getNumAssertions')) {
$numAssertions = $test->getNumAssertions();
} else {
$numAssertions = 0;
}

$this->testSuiteAssertions[$this->testSuiteLevel] += $numAssertions;
Expand All @@ -338,10 +338,10 @@ public function endTest(Test $test, float $time): void
$this->testSuiteTests[$this->testSuiteLevel]++;
$this->testSuiteTimes[$this->testSuiteLevel] += $time;

$testOutput = '';

if (\method_exists($test, 'hasOutput') && \method_exists($test, 'getActualOutput')) {
$testOutput = $test->hasOutput() ? $test->getActualOutput() : '';
} else {
$testOutput = '';
}

if (!empty($testOutput)) {
Expand Down

0 comments on commit 49ff35c

Please sign in to comment.