Merge pull request #154 from sminnee/dont-double-load-suite

FIX: Don't load suite twice.
This commit is contained in:
Damian Mooyman 2017-05-05 10:36:49 +12:00 committed by GitHub
commit 7383c1bce9

View File

@ -101,24 +101,16 @@ class ModuleSuiteLocator implements Controller
// Suite name always omits vendor
$suiteName = $module->getShortName();
// If suite is already configured in the root, switch to it and return
if (isset($this->suiteConfigurations[$suiteName])) {
$config = $this->suiteConfigurations[$suiteName];
$this->registry->registerSuiteConfiguration(
$suiteName,
$config['type'],
$config['settings']
);
return null;
}
// Suite doesn't exist, so load dynamically from nested `behat.yml`
if (!isset($this->suiteConfigurations[$suiteName])) {
$config = $this->loadSuiteConfiguration($suiteName, $module);
$this->registry->registerSuiteConfiguration(
$suiteName,
$config['type'],
$config['settings']
);
}
return null;
}