aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-06-18 15:04:48 +0200
committerAndreas Fischer <bantu@phpbb.com>2013-06-18 15:04:48 +0200
commit516581c41edaa5f565ef90bac14cdbdc054e7914 (patch)
tree84c338fd9405f85535d54f19c346c5f9299d59c3
parent30801e1f0a9aab6a3b4e589be1e43309543e8293 (diff)
downloadforums-516581c41edaa5f565ef90bac14cdbdc054e7914.tar
forums-516581c41edaa5f565ef90bac14cdbdc054e7914.tar.gz
forums-516581c41edaa5f565ef90bac14cdbdc054e7914.tar.bz2
forums-516581c41edaa5f565ef90bac14cdbdc054e7914.tar.xz
forums-516581c41edaa5f565ef90bac14cdbdc054e7914.zip
[ticket/11604] Use variables for config.php filesnames.
PHPBB3-11604
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 651ab013c7..1b47cbe125 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -184,15 +184,19 @@ class phpbb_functional_test_case extends phpbb_test_case
self::$config['table_prefix'] = 'phpbb_';
self::recreate_database(self::$config);
- if (file_exists($phpbb_root_path . "config.$phpEx"))
+ $config_file = $phpbb_root_path . "config.$phpEx";
+ $config_file_dev = $phpbb_root_path . "config_dev.$phpEx";
+ $config_file_test = $phpbb_root_path . "config_test.$phpEx";
+
+ if (file_exists($config_file))
{
- if (!file_exists($phpbb_root_path . "config_dev.$phpEx"))
+ if (!file_exists($config_file_dev))
{
- rename($phpbb_root_path . "config.$phpEx", $phpbb_root_path . "config_dev.$phpEx");
+ rename($config_file, $config_file_dev);
}
else
{
- unlink($phpbb_root_path . "config.$phpEx");
+ unlink($config_file);
}
}
@@ -254,7 +258,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$crawler = self::submit($form);
self::assertContains('The configuration file has been written.', $crawler->filter('#main')->text());
- file_put_contents($phpbb_root_path . "config.$phpEx", phpbb_create_config_file_data(self::$config, self::$config['dbms'], array(), true, true));
+ file_put_contents($config_file, phpbb_create_config_file_data(self::$config, self::$config['dbms'], array(), true, true));
$form = $crawler->selectButton('submit')->form();
$crawler = self::submit($form);
@@ -281,7 +285,7 @@ class phpbb_functional_test_case extends phpbb_test_case
$crawler = self::submit($form);
self::assertContains('You have successfully installed', $crawler->text());
- copy($phpbb_root_path . "config.$phpEx", $phpbb_root_path . "config_test.$phpEx");
+ copy($config_file, $config_file_test);
}
static private function recreate_database($config)