[ticket/12962] Mark test skipped when phantom server not running

PHPBB3-12962
This commit is contained in:
Dhruv 2014-08-10 12:55:21 +02:00
parent 8d0933ca4b
commit c371e86fa1
2 changed files with 7 additions and 3 deletions

View file

@ -34,7 +34,7 @@ install:
before_script: before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION - travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
- pidof phantomjs || nohup phantomjs --webserver=8910 > /dev/null - pidof phantomjs || nohup phantomjs --webdriver=8910 > /dev/null
- sleep 3 - sleep 3
script: script:

View file

@ -47,8 +47,12 @@ class phpbb_ui_test_case extends phpbb_test_case
if (!self::$webDriver) if (!self::$webDriver)
{ {
$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox'); try {
self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities); $capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox');
self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities);
} catch (WebDriverCurlException $e) {
self::markTestSkipped('PhantomJS webserver is not running.');
}
} }
if (!self::$already_installed) if (!self::$already_installed)