putenv('SYMFONY_EXPECTED_DEPRECATIONS_SERIALIZE'
);
$expectedDeprecations =
file_get_contents($file);
if ($expectedDeprecations) { self::
$expectedDeprecations =
array_merge(self::
$expectedDeprecations,
unserialize($expectedDeprecations));
if (!self::
$previousErrorHandler) { self::
$previousErrorHandler =
set_error_handler([self::
class, 'handleError'
]);
} } } if (class_exists(DebugClassLoader::
class, false
)) { DebugClassLoader::
checkClasses();
} $className = \
get_class($test);
$groups = Test::
getGroups($className,
$test->
getName(false
));
if ($this->checkNumAssertions
) { $assertions = \
count(self::
$expectedDeprecations) +
$test->
getNumAssertions();
if ($test->
doesNotPerformAssertions() &&
$assertions > 0
) { $test->
getTestResultObject()->
addFailure($test,
new RiskyTestError(sprintf('This test is annotated with "@doesNotPerformAssertions", but performed %s assertions',
$assertions)),
$time);
} elseif ($assertions === 0 && !
$test->
doesNotPerformAssertions() &&
$test->
getTestResultObject()->
noneSkipped()) { $test->
getTestResultObject()->
addFailure($test,
new RiskyTestError('This test did not perform any assertions'
),
$time);
}