added mink_loader option
This commit is contained in:
@@ -32,6 +32,9 @@ class Configuration implements ConfigurationInterface
|
||||
|
||||
return $treeBuilder->root('mink')->
|
||||
children()->
|
||||
scalarNode('mink_loader')->
|
||||
defaultNull()->
|
||||
end()->
|
||||
scalarNode('base_url')->
|
||||
defaultNull()->
|
||||
end()->
|
||||
|
||||
@@ -40,6 +40,16 @@ class Extension implements ExtensionInterface
|
||||
$config = $processor->processConfiguration($configuration, array($config));
|
||||
$loader->load('mink.xml');
|
||||
|
||||
if (isset($config['mink_loader'])) {
|
||||
$configPath = $container->getParameter('behat.paths.config');
|
||||
|
||||
if (file_exists($configPath.DIRECTORY_SEPARATOR.$config['mink_loader'])) {
|
||||
require($configPath.DIRECTORY_SEPARATOR.$config['mink_loader']);
|
||||
} else {
|
||||
require($config['mink_loader']);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($config['goutte'])) {
|
||||
$loader->load('sessions/goutte.xml');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user