mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/12962] Mark test skipped when phantom server not running
PHPBB3-12962
This commit is contained in:
parent
8d0933ca4b
commit
c371e86fa1
2 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue