mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
FIX: Don't load suite twice.
If the suite is already loaded, you can't call registerSuiteConfiguration a second time.
This commit is contained in:
parent
7fd508b9af
commit
9b48a30e2b
@ -101,24 +101,16 @@ class ModuleSuiteLocator implements Controller
|
|||||||
// Suite name always omits vendor
|
// Suite name always omits vendor
|
||||||
$suiteName = $module->getShortName();
|
$suiteName = $module->getShortName();
|
||||||
|
|
||||||
// If suite is already configured in the root, switch to it and return
|
// Suite doesn't exist, so load dynamically from nested `behat.yml`
|
||||||
if (isset($this->suiteConfigurations[$suiteName])) {
|
if (!isset($this->suiteConfigurations[$suiteName])) {
|
||||||
$config = $this->suiteConfigurations[$suiteName];
|
$config = $this->loadSuiteConfiguration($suiteName, $module);
|
||||||
$this->registry->registerSuiteConfiguration(
|
$this->registry->registerSuiteConfiguration(
|
||||||
$suiteName,
|
$suiteName,
|
||||||
$config['type'],
|
$config['type'],
|
||||||
$config['settings']
|
$config['settings']
|
||||||
);
|
);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suite doesn't exist, so load dynamically from nested `behat.yml`
|
|
||||||
$config = $this->loadSuiteConfiguration($suiteName, $module);
|
|
||||||
$this->registry->registerSuiteConfiguration(
|
|
||||||
$suiteName,
|
|
||||||
$config['type'],
|
|
||||||
$config['settings']
|
|
||||||
);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user