Skip to content

Commit

Permalink
Use strict comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed May 28, 2020
1 parent 09474f7 commit a7a3cf2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Framework/TestResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public function endTest(Test $test, float $time): void
*/
public function allHarmless(): bool
{
return $this->riskyCount() == 0;
return $this->riskyCount() === 0;
}

/**
Expand All @@ -456,7 +456,7 @@ public function riskyCount(): int
*/
public function allCompletelyImplemented(): bool
{
return $this->notImplementedCount() == 0;
return $this->notImplementedCount() === 0;
}

/**
Expand Down Expand Up @@ -492,7 +492,7 @@ public function notImplemented(): array
*/
public function noneSkipped(): bool
{
return $this->skippedCount() == 0;
return $this->skippedCount() === 0;
}

/**
Expand Down Expand Up @@ -644,7 +644,7 @@ public function run(Test $test): void

$monitorFunctions = $this->beStrictAboutResourceUsageDuringSmallTests &&
!$test instanceof WarningTestCase &&
$test->getSize() == \PHPUnit\Util\Test::SMALL &&
$test->getSize() === \PHPUnit\Util\Test::SMALL &&
\function_exists('xdebug_start_function_monitor');

if ($monitorFunctions) {
Expand Down Expand Up @@ -769,7 +769,7 @@ public function run(Test $test): void
}

if ($this->beStrictAboutTestsThatDoNotTestAnything &&
$test->getNumAssertions() == 0) {
$test->getNumAssertions() === 0) {
$risky = true;
}

Expand Down Expand Up @@ -855,7 +855,7 @@ public function run(Test $test): void
$this->addWarning($test, $e, $time);
} elseif ($this->beStrictAboutTestsThatDoNotTestAnything &&
!$test->doesNotPerformAssertions() &&
$test->getNumAssertions() == 0) {
$test->getNumAssertions() === 0) {
try {
$reflected = new \ReflectionClass($test);
// @codeCoverageIgnoreStart
Expand Down

0 comments on commit a7a3cf2

Please sign in to comment.