diff --git a/Legacy/SymfonyTestsListenerTrait.php b/Legacy/SymfonyTestsListenerTrait.php index 21cdfa97..00433b16 100644 --- a/Legacy/SymfonyTestsListenerTrait.php +++ b/Legacy/SymfonyTestsListenerTrait.php @@ -253,7 +253,7 @@ public function endTest($test, $time) $groups = Test::getGroups($className, $test->getName(false)); if ($this->checkNumAssertions) { - if (!self::$expectedDeprecations && !$test->getNumAssertions()) { + if (!self::$expectedDeprecations && !$test->getNumAssertions() && $test->getTestResultObject()->noneSkipped()) { $test->getTestResultObject()->addFailure($test, new RiskyTestError('This test did not perform any assertions'), $time); }