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