private function TestModuleContext::getModules in Lightning Core 8.5
Same name and namespace in other branches
- 8 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::getModules()
- 8.2 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::getModules()
- 8.3 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::getModules()
- 8.4 tests/contexts/TestModuleContext.behat.inc \Acquia\LightningExtension\Context\TestModuleContext::getModules()
Determines the test modules to install during the scenario.
Parameters
\Behat\Behat\Hook\Scope\ScenarioScope $scope: The current scenario scope.
Return value
string[] The test modules to install.
2 calls to TestModuleContext::getModules()
- TestModuleContext::install in tests/
contexts/ TestModuleContext.behat.inc - Installs test modules for this scenario.
- TestModuleContext::uninstall in tests/
contexts/ TestModuleContext.behat.inc - Uninstalls any test modules installed for the scenario.
File
- tests/
contexts/ TestModuleContext.behat.inc, line 31
Class
- TestModuleContext
- Allows test modules to be installed during a scenario and uninstalled after.
Namespace
Acquia\LightningExtension\ContextCode
private function getModules(ScenarioScope $scope) {
$modules = [];
$tags = array_merge($scope
->getFeature()
->getTags(), $scope
->getScenario()
->getTags());
foreach ($tags as $tag) {
if (strpos($tag, 'with-module:') === 0) {
$modules[] = substr($tag, 12);
}
}
return array_unique($modules);
}