public function PHPUnit_Util_Configuration::getSeleniumBrowserConfiguration in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/Configuration.php \PHPUnit_Util_Configuration::getSeleniumBrowserConfiguration()
Returns the SeleniumTestCase browser configuration.
@since Method available since Release 3.2.9
Return value
array
File
- vendor/
phpunit/ phpunit/ src/ Util/ Configuration.php, line 801
Class
- PHPUnit_Util_Configuration
- Wrapper for the PHPUnit XML configuration file.
Code
public function getSeleniumBrowserConfiguration() {
$result = array();
foreach ($this->xpath
->query('selenium/browser') as $config) {
$name = (string) $config
->getAttribute('name');
$browser = (string) $config
->getAttribute('browser');
if ($config
->hasAttribute('host')) {
$host = (string) $config
->getAttribute('host');
}
else {
$host = 'localhost';
}
if ($config
->hasAttribute('port')) {
$port = $this
->getInteger((string) $config
->getAttribute('port'), 4444);
}
else {
$port = 4444;
}
if ($config
->hasAttribute('timeout')) {
$timeout = $this
->getInteger((string) $config
->getAttribute('timeout'), 30000);
}
else {
$timeout = 30000;
}
$result[] = array(
'name' => $name,
'browser' => $browser,
'host' => $host,
'port' => $port,
'timeout' => $timeout,
);
}
return $result;
}