diff options
author | Marc Alexander <admin@m-a-styles.de> | 2014-11-13 17:12:09 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2014-11-13 17:12:09 +0100 |
commit | 1f2ec038fbcd35a22cf7ea4571baf347cfe85dac (patch) | |
tree | 8791e50a82f28957b92beda5bdb3b57974a0db5f /tests | |
parent | 07957668370c0a8adcce0ae596ee4b402f60146b (diff) | |
parent | c9db08873f1e1d9f9f89da181d5aa374464fc250 (diff) | |
download | forums-1f2ec038fbcd35a22cf7ea4571baf347cfe85dac.tar forums-1f2ec038fbcd35a22cf7ea4571baf347cfe85dac.tar.gz forums-1f2ec038fbcd35a22cf7ea4571baf347cfe85dac.tar.bz2 forums-1f2ec038fbcd35a22cf7ea4571baf347cfe85dac.tar.xz forums-1f2ec038fbcd35a22cf7ea4571baf347cfe85dac.zip |
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bootstrap.php | 5 | ||||
-rw-r--r-- | tests/composer.lock | 2 | ||||
-rw-r--r-- | tests/test_framework/phpbb_ui_test_case.php | 16 |
3 files changed, 18 insertions, 5 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 65447eb95c..0e81f4372a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -33,8 +33,9 @@ require_once 'test_framework/phpbb_test_case.php'; require_once 'test_framework/phpbb_database_test_case.php'; require_once 'test_framework/phpbb_database_test_connection_manager.php'; require_once 'test_framework/phpbb_functional_test_case.php'; +require_once 'test_framework/phpbb_ui_test_case.php'; -if (version_compare(PHP_VERSION,'5.3.19', ">=")) +if (version_compare(PHP_VERSION, '5.3.19', ">=") && file_exists(__DIR__ . '/vendor/autoload.php')) { - require_once 'test_framework/phpbb_ui_test_case.php'; + require_once __DIR__ . '/vendor/autoload.php'; } diff --git a/tests/composer.lock b/tests/composer.lock index 32d90d43fc..f714495d84 100644 --- a/tests/composer.lock +++ b/tests/composer.lock @@ -3,7 +3,7 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "2affca245bd4946ca7acdf46f100af3c", + "hash": "cf1d8a4841e5e669b148e0df6645a788", "packages": [ ], diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php index 702b15d50a..c8ac492e25 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -10,7 +10,7 @@ * the docs/CREDITS.txt file. * */ -require_once __DIR__ . '/../vendor/facebook/webdriver/lib/__init__.php'; + require_once __DIR__ . '/../../phpBB/includes/functions_install.php'; class phpbb_ui_test_case extends phpbb_test_case @@ -31,6 +31,18 @@ class phpbb_ui_test_case extends phpbb_test_case { parent::setUpBeforeClass(); + if (version_compare(PHP_VERSION, '5.3.19', '<')) + { + self::markTestSkipped('UI test case requires at least PHP 5.3.19.'); + } + else if (!class_exists('\RemoteWebDriver')) + { + self::markTestSkipped( + 'Could not find RemoteWebDriver class. ' . + 'Run "php ../composer.phar install" from the tests folder.' + ); + } + self::$config = phpbb_test_case_helpers::get_test_config(); self::$root_url = self::$config['phpbb_functional_url']; @@ -49,7 +61,7 @@ class phpbb_ui_test_case extends phpbb_test_case { try { $capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => 'firefox'); - self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities); + self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities); } catch (WebDriverCurlException $e) { self::markTestSkipped('PhantomJS webserver is not running.'); } |