You are here

private function PHPUnit_Framework_TestCase::compareGlobalStateSnapshotPart in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/TestCase.php \PHPUnit_Framework_TestCase::compareGlobalStateSnapshotPart()

Parameters

array $before:

array $after:

string $header:

Throws

PHPUnit_Framework_RiskyTestError

1 call to PHPUnit_Framework_TestCase::compareGlobalStateSnapshotPart()
PHPUnit_Framework_TestCase::compareGlobalStateSnapshots in vendor/phpunit/phpunit/src/Framework/TestCase.php

File

vendor/phpunit/phpunit/src/Framework/TestCase.php, line 2065

Class

PHPUnit_Framework_TestCase
A TestCase defines the fixture to run multiple tests.

Code

private function compareGlobalStateSnapshotPart(array $before, array $after, $header) {
  if ($before != $after) {
    $differ = new Differ($header);
    $exporter = new Exporter();
    $diff = $differ
      ->diff($exporter
      ->export($before), $exporter
      ->export($after));
    throw new PHPUnit_Framework_RiskyTestError($diff);
  }
}