mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12962] Mark test skipped when phantom server not running
PHPBB3-12962
This commit is contained in:
@@ -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:
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user