FIX illegal_extensions in unit tests not being removed

This commit is contained in:
Mike Cochrane 2017-03-30 13:54:53 +13:00 committed by GitHub
parent 9cdcb339e9
commit 227ba8dcc4
1 changed files with 8 additions and 8 deletions

View File

@ -356,15 +356,15 @@ class SapphireTest extends PHPUnit_Framework_TestCase
continue;
}
foreach ($extensions as $extension) {
if (!class_exists($extension) ||$class::has_extension($extension)) {
if (!class_exists($extension) || !$class::has_extension($extension)) {
continue;
}if (!isset(self::$extensions_to_reapply[$class])) {
self::$extensions_to_reapply[$class] = array();
}
self::$extensions_to_reapply[$class][] = $extension;
$class::remove_extension($extension);
$isAltered = true;
}
if (!isset(self::$extensions_to_reapply[$class])) {
self::$extensions_to_reapply[$class] = array();
}
self::$extensions_to_reapply[$class][] = $extension;
$class::remove_extension($extension);
$isAltered = true;
}
}