diff --git a/src/Framework/TestResult.php b/src/Framework/TestResult.php index a1bb2f7199e..e856dcda884 100644 --- a/src/Framework/TestResult.php +++ b/src/Framework/TestResult.php @@ -440,7 +440,7 @@ public function endTest(Test $test, float $time): void */ public function allHarmless(): bool { - return $this->riskyCount() == 0; + return $this->riskyCount() === 0; } /** @@ -456,7 +456,7 @@ public function riskyCount(): int */ public function allCompletelyImplemented(): bool { - return $this->notImplementedCount() == 0; + return $this->notImplementedCount() === 0; } /** @@ -492,7 +492,7 @@ public function notImplemented(): array */ public function noneSkipped(): bool { - return $this->skippedCount() == 0; + return $this->skippedCount() === 0; } /** @@ -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) { @@ -769,7 +769,7 @@ public function run(Test $test): void } if ($this->beStrictAboutTestsThatDoNotTestAnything && - $test->getNumAssertions() == 0) { + $test->getNumAssertions() === 0) { $risky = true; } @@ -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