moved drivers check after mink_loader requirement
This commit is contained in:
@@ -47,18 +47,48 @@ class Extension implements ExtensionInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($config['goutte'])) {
|
if (isset($config['goutte'])) {
|
||||||
|
if (!class_exists('Behat\\Mink\\Driver\\GoutteDriver')) {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
'Install MinkGoutteDriver in order to activate goutte session.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$loader->load('sessions/goutte.xml');
|
$loader->load('sessions/goutte.xml');
|
||||||
}
|
}
|
||||||
if (isset($config['sahi'])) {
|
if (isset($config['sahi'])) {
|
||||||
|
if (!class_exists('Behat\\Mink\\Driver\\SahiDriver')) {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
'Install MinkSahiDriver in order to activate sahi session.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$loader->load('sessions/sahi.xml');
|
$loader->load('sessions/sahi.xml');
|
||||||
}
|
}
|
||||||
if (isset($config['zombie'])) {
|
if (isset($config['zombie'])) {
|
||||||
|
if (!class_exists('Behat\\Mink\\Driver\\ZombieDriver')) {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
'Install MinkZombieDriver in order to activate zombie session.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$loader->load('sessions/zombie.xml');
|
$loader->load('sessions/zombie.xml');
|
||||||
}
|
}
|
||||||
if (isset($config['selenium'])) {
|
if (isset($config['selenium'])) {
|
||||||
|
if (!class_exists('Behat\\Mink\\Driver\\SeleniumDriver')) {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
'Install MinkSeleniumDriver in order to activate selenium session.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$loader->load('sessions/selenium.xml');
|
$loader->load('sessions/selenium.xml');
|
||||||
}
|
}
|
||||||
if (isset($config['selenium2'])) {
|
if (isset($config['selenium2'])) {
|
||||||
|
if (!class_exists('Behat\\Mink\\Driver\\Selenium2Driver')) {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
'Install MinkSelenium2Driver in order to activate selenium2 session.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$loader->load('sessions/selenium2.xml');
|
$loader->load('sessions/selenium2.xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,10 +147,6 @@ class Extension implements ExtensionInterface
|
|||||||
defaultValue('firefox')->
|
defaultValue('firefox')->
|
||||||
end()->
|
end()->
|
||||||
arrayNode('goutte')->
|
arrayNode('goutte')->
|
||||||
validate()->
|
|
||||||
ifTrue(function($v) { return !class_exists('Behat\\Mink\\Driver\\GoutteDriver'); })->
|
|
||||||
thenInvalid('Install MinkGoutteDriver in order to activate goutte session.')->
|
|
||||||
end()->
|
|
||||||
children()->
|
children()->
|
||||||
arrayNode('server_parameters')->
|
arrayNode('server_parameters')->
|
||||||
useAttributeAsKey('key')->
|
useAttributeAsKey('key')->
|
||||||
@@ -129,10 +155,6 @@ class Extension implements ExtensionInterface
|
|||||||
end()->
|
end()->
|
||||||
end()->
|
end()->
|
||||||
arrayNode('sahi')->
|
arrayNode('sahi')->
|
||||||
validate()->
|
|
||||||
ifTrue(function($v) { return !class_exists('Behat\\Mink\\Driver\\SahiDriver'); })->
|
|
||||||
thenInvalid('Install MinkSahiDriver in order to activate sahi session.')->
|
|
||||||
end()->
|
|
||||||
children()->
|
children()->
|
||||||
scalarNode('sid')->
|
scalarNode('sid')->
|
||||||
defaultNull()->
|
defaultNull()->
|
||||||
@@ -146,10 +168,6 @@ class Extension implements ExtensionInterface
|
|||||||
end()->
|
end()->
|
||||||
end()->
|
end()->
|
||||||
arrayNode('zombie')->
|
arrayNode('zombie')->
|
||||||
validate()->
|
|
||||||
ifTrue(function($v) { return !class_exists('Behat\\Mink\\Driver\\ZombieDriver'); })->
|
|
||||||
thenInvalid('Install MinkZombieDriver in order to activate zombie session.')->
|
|
||||||
end()->
|
|
||||||
children()->
|
children()->
|
||||||
scalarNode('host')->
|
scalarNode('host')->
|
||||||
defaultValue('127.0.0.1')->
|
defaultValue('127.0.0.1')->
|
||||||
@@ -166,10 +184,6 @@ class Extension implements ExtensionInterface
|
|||||||
end()->
|
end()->
|
||||||
end()->
|
end()->
|
||||||
arrayNode('selenium')->
|
arrayNode('selenium')->
|
||||||
validate()->
|
|
||||||
ifTrue(function($v) { return !class_exists('Behat\\Mink\\Driver\\SeleniumDriver'); })->
|
|
||||||
thenInvalid('Install MinkSeleniumDriver in order to activate selenium session.')->
|
|
||||||
end()->
|
|
||||||
children()->
|
children()->
|
||||||
scalarNode('host')->
|
scalarNode('host')->
|
||||||
defaultValue('127.0.0.1')->
|
defaultValue('127.0.0.1')->
|
||||||
@@ -183,10 +197,6 @@ class Extension implements ExtensionInterface
|
|||||||
end()->
|
end()->
|
||||||
end()->
|
end()->
|
||||||
arrayNode('selenium2')->
|
arrayNode('selenium2')->
|
||||||
validate()->
|
|
||||||
ifTrue(function($v) { return !class_exists('Behat\\Mink\\Driver\\Selenium2Driver'); })->
|
|
||||||
thenInvalid('Install MinkSelenium2Driver in order to activate selenium2 session.')->
|
|
||||||
end()->
|
|
||||||
children()->
|
children()->
|
||||||
scalarNode('browser')->
|
scalarNode('browser')->
|
||||||
defaultValue('%behat.mink.browser_name%')->
|
defaultValue('%behat.mink.browser_name%')->
|
||||||
|
|||||||
Reference in New Issue
Block a user