diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-16 00:06:52 +0100 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-16 00:06:52 +0100 |
commit | d0ce6a18df2172a6e9baf1f1c2802efb30b25323 (patch) | |
tree | 478bf6c878bacec7c4e60832e0af7d106bd52e52 /tests/test_framework/phpbb_functional_test_case.php | |
parent | 00d71d854cb844cba7755a2e8adfa4217dbc0ef0 (diff) | |
parent | 6debd9a1bea4ee69a06eac43cc6b2f856f601604 (diff) | |
download | forums-d0ce6a18df2172a6e9baf1f1c2802efb30b25323.tar forums-d0ce6a18df2172a6e9baf1f1c2802efb30b25323.tar.gz forums-d0ce6a18df2172a6e9baf1f1c2802efb30b25323.tar.bz2 forums-d0ce6a18df2172a6e9baf1f1c2802efb30b25323.tar.xz forums-d0ce6a18df2172a6e9baf1f1c2802efb30b25323.zip |
Merge pull request #4171 from CHItA/ticket/14462
[ticket/14462] Try to prevent timeouts in the installer
* CHItA/ticket/14462:
[ticket/14462] Not show timeout messages in convertors
[ticket/14462] Make timeout error translateable
[ticket/14462] Update ordering in install db config
[ticket/14462] Fix comments
[ticket/14462] Fix tests
[ticket/14462] Fix CS and typo
[ticket/14462] Set instance of db driver for database access using global
[ticket/14462] Fix installation in tests
[ticket/14462] Refactor tasks to be more modular
[ticket/14462] Further speed improvements
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 34fbcec0e2..53519617b3 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -20,6 +20,7 @@ class phpbb_functional_test_case extends phpbb_test_case static protected $client; static protected $cookieJar; static protected $root_url; + static protected $install_success = false; protected $cache = null; protected $db = null; @@ -78,6 +79,11 @@ class phpbb_functional_test_case extends phpbb_test_case { parent::setUp(); + if (!self::$install_success) + { + $this->fail('Installing phpBB has failed.'); + } + $this->bootstrap(); self::$cookieJar = new CookieJar; @@ -360,17 +366,21 @@ class phpbb_functional_test_case extends phpbb_test_case $iohandler->set_input('script_path', $parseURL['path']); $iohandler->set_input('submit_server', 'submit'); - do - { - $installer->run(); - } - while (file_exists($phpbb_root_path . 'store/install_config.php')); + $installer->run(); copy($config_file, $config_file_test); + self::$install_success = true; + + if (file_exists($phpbb_root_path . 'store/install_config.php')) + { + self::$install_success = false; + @unlink($phpbb_root_path . 'store/install_config.php'); + } + if (file_exists($phpbb_root_path . 'cache/install_lock')) { - unlink($phpbb_root_path . 'cache/install_lock'); + @unlink($phpbb_root_path . 'cache/install_lock'); } global $phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template; |