mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Regression from 3.x: allow $required_extensions to have arguments
This commit is contained in:
parent
16aebb83e4
commit
c95c6c466f
@ -16,6 +16,7 @@ use SilverStripe\Core\Config\ConfigLoader;
|
|||||||
use SilverStripe\Core\Config\CoreConfigFactory;
|
use SilverStripe\Core\Config\CoreConfigFactory;
|
||||||
use SilverStripe\Core\Config\DefaultConfig;
|
use SilverStripe\Core\Config\DefaultConfig;
|
||||||
use SilverStripe\Core\Config\Middleware\ExtensionMiddleware;
|
use SilverStripe\Core\Config\Middleware\ExtensionMiddleware;
|
||||||
|
use SilverStripe\Core\Extension;
|
||||||
use SilverStripe\Core\Flushable;
|
use SilverStripe\Core\Flushable;
|
||||||
use SilverStripe\Core\Injector\Injector;
|
use SilverStripe\Core\Injector\Injector;
|
||||||
use SilverStripe\Core\Manifest\ClassManifest;
|
use SilverStripe\Core\Manifest\ClassManifest;
|
||||||
@ -376,7 +377,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
self::$extensions_to_remove[$class] = array();
|
self::$extensions_to_remove[$class] = array();
|
||||||
foreach ($extensions as $extension) {
|
foreach ($extensions as $extension) {
|
||||||
if (!class_exists($extension)) {
|
$extensionClass = Extension::get_classname_without_arguments($extension);
|
||||||
|
if (!class_exists($extensionClass)) {
|
||||||
$self = static::class;
|
$self = static::class;
|
||||||
throw new LogicException("Test {$self} requires extension {$extension} which doesn't exist");
|
throw new LogicException("Test {$self} requires extension {$extension} which doesn't exist");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user