From c371e86fa1a640661a47b1d4871f4ea7730f727f Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 10 Aug 2014 12:55:21 +0200 Subject: [PATCH] [ticket/12962] Mark test skipped when phantom server not running PHPBB3-12962 --- .travis.yml | 2 +- tests/test_framework/phpbb_ui_test_case.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ebe2dfe8f0..1bd16fdef7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ install: before_script: - 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 script: diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php index 271a102299..9671cc5da4 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -47,8 +47,12 @@ class phpbb_ui_test_case extends phpbb_test_case if (!self::$webDriver) { - $capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox'); - self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities); + try { + $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)