1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/14462] Fix installation in tests

PHPBB3-14462
This commit is contained in:
Mate Bartus
2016-02-12 14:26:32 +01:00
parent 68091561ab
commit d63b5a1315
3 changed files with 27 additions and 13 deletions

View File

@@ -26,6 +26,7 @@ class phpbb_ui_test_case extends phpbb_test_case
static protected $config;
static protected $root_url;
static protected $already_installed = false;
static protected $install_success = false;
static public function setUpBeforeClass()
{
@@ -74,6 +75,14 @@ class phpbb_ui_test_case extends phpbb_test_case
}
}
public function setUp()
{
if (!self::$install_success)
{
$this->fail('Installing phpBB has failed.');
}
}
static public function visit($path)
{
self::$webDriver->get(self::$root_url . $path);
@@ -194,17 +203,17 @@ class phpbb_ui_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);
if (file_exists($phpbb_root_path . 'cache/install_lock'))
self::$install_success = true;
if (file_exists($phpbb_root_path . 'cache/install_lock') || file_exists($phpbb_root_path . 'store/install_config.php'))
{
self::$install_success = false;
unlink($phpbb_root_path . 'cache/install_lock');
unlink($phpbb_root_path . 'store/install_config.php');
}
global $phpbb_container, $cache, $phpbb_dispatcher, $request, $user, $auth, $db, $config, $phpbb_log, $symfony_request, $phpbb_filesystem, $phpbb_path_helper, $phpbb_extension_manager, $template;