function TestCase::compareGlobalStateSnapshotPart
Throws
MoreThanOneDataSetFromDataProviderException
1 call to TestCase::compareGlobalStateSnapshotPart()
- TestCase::compareGlobalStateSnapshots in vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php, line 1874
Class
- TestCase
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\FrameworkCode
private function compareGlobalStateSnapshotPart(array $before, array $after, string $header) : void {
if ($before != $after) {
$differ = new Differ(new UnifiedDiffOutputBuilder($header));
$exporter = new Exporter();
Event\Facade::emitter()->testConsideredRisky($this->valueObjectForEvents(), 'This test modified global state but was not expected to do so' . PHP_EOL . trim($differ->diff($exporter->export($before), $exporter->export($after))));
}
}