private function PHPUnit_Framework_TestCase::restoreGlobalState in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/TestCase.php \PHPUnit_Framework_TestCase::restoreGlobalState()
1 call to PHPUnit_Framework_TestCase::restoreGlobalState()
- PHPUnit_Framework_TestCase::runBare in vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php - Runs the bare test sequence.
File
- vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php, line 1955
Class
- PHPUnit_Framework_TestCase
- A TestCase defines the fixture to run multiple tests.
Code
private function restoreGlobalState() {
if (!$this->snapshot instanceof Snapshot) {
return;
}
$backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true;
if ($this->disallowChangesToGlobalState) {
$this
->compareGlobalStateSnapshots($this->snapshot, $this
->createGlobalStateSnapshot($backupGlobals));
}
$restorer = new Restorer();
if ($backupGlobals) {
$restorer
->restoreGlobalVariables($this->snapshot);
}
if ($this->backupStaticAttributes) {
$restorer
->restoreStaticAttributes($this->snapshot);
}
$this->snapshot = null;
}