mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #6760 from mikenz/patch-10
FIX illegal_extensions in unit tests not being honored
This commit is contained in:
commit
2b67481225
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user