diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-11 22:24:01 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-05-11 22:26:54 -0400 |
| commit | 725db1ba29960aa8ad2a24c7324078c69c6c8ced (patch) | |
| tree | 5b1637f010dd89aa006030e8e4bce76b0ac7e456 /tests/test_framework | |
| parent | 1fcb269616c4241cf93bc8d7db4a202a4e5f79f8 (diff) | |
| download | forums-725db1ba29960aa8ad2a24c7324078c69c6c8ced.tar forums-725db1ba29960aa8ad2a24c7324078c69c6c8ced.tar.gz forums-725db1ba29960aa8ad2a24c7324078c69c6c8ced.tar.bz2 forums-725db1ba29960aa8ad2a24c7324078c69c6c8ced.tar.xz forums-725db1ba29960aa8ad2a24c7324078c69c6c8ced.zip | |
[ticket/10891] Allow specifying test_config.php path via environment.
PHPBB3-10891
Diffstat (limited to 'tests/test_framework')
| -rw-r--r-- | tests/test_framework/phpbb_test_case_helpers.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index b46c36efaa..2a3c27f9f9 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -58,9 +58,19 @@ class phpbb_test_case_helpers )); } - if (file_exists(dirname(__FILE__) . '/../test_config.php')) + if (isset($_SERVER['PHPBB_TEST_CONFIG'])) { - include(dirname(__FILE__) . '/../test_config.php'); + // Could be an absolute path + $test_config = $_SERVER['PHPBB_TEST_CONFIG']; + } + else + { + $test_config = dirname(__FILE__) . '/../test_config.php'; + } + + if (file_exists($test_config)) + { + include($test_config); $config = array_merge($config, array( 'dbms' => $dbms, |
