mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/10891] Allow specifying test_config.php path via environment.
This commit is contained in:
commit
2715fc5bdf
2 changed files with 18 additions and 2 deletions
|
@ -37,6 +37,12 @@ options can be found on the wiki (see below).
|
||||||
$dbuser = 'user';
|
$dbuser = 'user';
|
||||||
$dbpasswd = 'password';
|
$dbpasswd = 'password';
|
||||||
|
|
||||||
|
It is possible to have multiple test_config.php files, for example if you
|
||||||
|
are testing on multiple databases. You can specify which test_config.php file
|
||||||
|
to use in the environment as follows:
|
||||||
|
|
||||||
|
$ PHPBB_TEST_CONFIG=tests/test_config.php phpunit
|
||||||
|
|
||||||
Alternatively you can specify parameters in the environment, so e.g. the
|
Alternatively you can specify parameters in the environment, so e.g. the
|
||||||
following will run phpunit with the same parameters as in the shown
|
following will run phpunit with the same parameters as in the shown
|
||||||
test_config.php file:
|
test_config.php file:
|
||||||
|
|
|
@ -63,9 +63,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(
|
$config = array_merge($config, array(
|
||||||
'dbms' => $dbms,
|
'dbms' => $dbms,
|
||||||
|
|
Loading…
Add table
Reference in a new issue