Skip to content

Commit

Permalink
Use the new getInteger() method also for integer configuration values…
Browse files Browse the repository at this point in the history
… for Selenium.
  • Loading branch information
sebastianbergmann committed Oct 8, 2011
1 parent a9aa2b5 commit 0df8fa1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions PHPUnit/Util/Configuration.php
Expand Up @@ -718,13 +718,17 @@ public function getSeleniumBrowserConfiguration()
} }


if ($config->hasAttribute('port')) { if ($config->hasAttribute('port')) {
$port = (int)$config->getAttribute('port'); $port = $this->getInteger(
(string)$config->getAttribute('port'), 4444
);
} else { } else {
$port = 4444; $port = 4444;
} }


if ($config->hasAttribute('timeout')) { if ($config->hasAttribute('timeout')) {
$timeout = (int)$config->getAttribute('timeout'); $timeout = $this->getInteger(
(string)$config->getAttribute('timeout'), 30000
);
} else { } else {
$timeout = 30000; $timeout = 30000;
} }
Expand Down

0 comments on commit 0df8fa1

Please sign in to comment.