diff --git a/PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php b/PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php index 51dad25..d89ec82 100644 --- a/PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php +++ b/PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php @@ -90,10 +90,12 @@ protected function getDriver(array $browser) 'Array element "browser" is not a string.' ); } + $this->browserName = $browser['browser']; } else { $browser['browser'] = ''; } + if (isset($browser['host'])) { if (!is_string($browser['host'])) { throw new InvalidArgumentException( @@ -185,24 +187,26 @@ protected function getDriver(array $browser) error_log('Warning: no access key provided. This may result in "Could not connect to Selenium RC serve". Run "sauce configure " or call $this->setAccessKey to fix'); } - if (isset($browser['os'])) { - if (!is_string($browser['os'])) { + if (isset($browser['browserVersion'])) { + if (!is_string($browser['browserVersion'])) { throw new InvalidArgumentException( - 'Array element "os" is not a string.' + 'Array element "browserVersion" is not a string.' ); } - $driver->setOs($browser['os']); + $driver->setBrowserVersion($browser['browserVersion']); + $this->browserName .= " ".$browser['browserVersion']; } - if (isset($browser['browserVersion'])) { - if (!is_string($browser['browserVersion'])) { + if (isset($browser['os'])) { + if (!is_string($browser['os'])) { throw new InvalidArgumentException( - 'Array element "browserVersion" is not a string.' + 'Array element "os" is not a string.' ); } - $driver->setBrowserVersion($browser['browserVersion']); + $driver->setOs($browser['os']); + $this->browserName .= " ".$browser['os']; } if (isset($browser['jobName'])) {