diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-10-20 19:59:36 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-10-20 20:46:11 +0200 |
commit | 981d3005f37d6298bd8775154e83194dbe0a0ed1 (patch) | |
tree | 0a386303031fdf845bc50e179387b23438aaf86e /phpBB | |
parent | faf4b03c43ecac7aa16e42433cce591512f3ef90 (diff) | |
download | forums-981d3005f37d6298bd8775154e83194dbe0a0ed1.tar forums-981d3005f37d6298bd8775154e83194dbe0a0ed1.tar.gz forums-981d3005f37d6298bd8775154e83194dbe0a0ed1.tar.bz2 forums-981d3005f37d6298bd8775154e83194dbe0a0ed1.tar.xz forums-981d3005f37d6298bd8775154e83194dbe0a0ed1.zip |
[ticket/13126] Fix tests
PHPBB3-13126
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/console/command/db/console_migrator_output_handler.php | 1 | ||||
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 20 | ||||
-rw-r--r-- | phpBB/phpbb/db/null_migrator_output_handler.php (renamed from phpBB/phpbb/db/migration/null_migrator_output_handler.php) | 2 |
3 files changed, 11 insertions, 12 deletions
diff --git a/phpBB/phpbb/console/command/db/console_migrator_output_handler.php b/phpBB/phpbb/console/command/db/console_migrator_output_handler.php index 74549e8e42..92a047605d 100644 --- a/phpBB/phpbb/console/command/db/console_migrator_output_handler.php +++ b/phpBB/phpbb/console/command/db/console_migrator_output_handler.php @@ -14,7 +14,6 @@ namespace phpbb\console\command\db; use phpbb\user; -use phpbb\db\migrator_output_handler; use Symfony\Component\Console\Output\OutputInterface; class console_migrator_output_handler implements migrator_output_handler_interface diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index c2fa04eb44..621a808a03 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -108,7 +108,7 @@ class migrator * * @param migrator_output_handler $handler The output handler */ - public function set_output_handler(migrator_output_handler $handler) + public function set_output_handler(migrator_output_handler_interface $handler) { $this->output_handler = $handler; } @@ -182,7 +182,7 @@ class migrator } else { - $this->output_handler->write(array('MIGRATION_EFFECTIVELY_INSTALLED', $name), migrator_output_handler::VERBOSITY_DEBUG); + $this->output_handler->write(array('MIGRATION_EFFECTIVELY_INSTALLED', $name), migrator_output_handler_interface::VERBOSITY_DEBUG); } } } @@ -198,7 +198,7 @@ class migrator { if (!class_exists($name)) { - $this->output_handler->write(array('MIGRATION_NOT_VALID', $name), migrator_output_handler::VERBOSITY_DEBUG); + $this->output_handler->write(array('MIGRATION_NOT_VALID', $name), migrator_output_handler_interface::VERBOSITY_DEBUG); return false; } @@ -217,7 +217,7 @@ class migrator if (!empty($state['migration_depends_on'])) { - $this->output_handler->write(array('MIGRATION_APPLY_DEPENDENCIES', $name), migrator_output_handler::VERBOSITY_DEBUG); + $this->output_handler->write(array('MIGRATION_APPLY_DEPENDENCIES', $name), migrator_output_handler_interface::VERBOSITY_DEBUG); } foreach ($state['migration_depends_on'] as $depend) @@ -257,7 +257,7 @@ class migrator $this->last_run_migration['effectively_installed'] = true; - $this->output_handler->write(array('MIGRATION_EFFECTIVELY_INSTALLED', $name), migrator_output_handler::VERBOSITY_VERBOSE); + $this->output_handler->write(array('MIGRATION_EFFECTIVELY_INSTALLED', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE); } else { @@ -269,7 +269,7 @@ class migrator if (!$state['migration_schema_done']) { - $this->output_handler->write(array('MIGRATION_SCHEMA_RUNNING', $name), migrator_output_handler::VERBOSITY_VERBOSE); + $this->output_handler->write(array('MIGRATION_SCHEMA_RUNNING', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE); $this->last_run_migration['task'] = 'process_schema_step'; $elapsed_time = microtime(true); @@ -280,13 +280,13 @@ class migrator $state['migration_data_state'] = ($result === true) ? '' : $result; $state['migration_schema_done'] = ($result === true); - $this->output_handler->write(array('MIGRATION_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler::VERBOSITY_NORMAL); + $this->output_handler->write(array('MIGRATION_SCHEMA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); } else if (!$state['migration_data_done']) { try { - $this->output_handler->write(array('MIGRATION_DATA_RUNNING', $name), migrator_output_handler::VERBOSITY_VERBOSE); + $this->output_handler->write(array('MIGRATION_DATA_RUNNING', $name), migrator_output_handler_interface::VERBOSITY_VERBOSE); $this->last_run_migration['task'] = 'process_data_step'; @@ -300,11 +300,11 @@ class migrator if ($state['migration_schema_done']) { - $this->output_handler->write(array('MIGRATION_DATA_DONE', $name, $elapsed_time), migrator_output_handler::VERBOSITY_NORMAL); + $this->output_handler->write(array('MIGRATION_DATA_DONE', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_NORMAL); } else { - $this->output_handler->write(array('MIGRATION_DATA_IN_PROGRESS', $name, $elapsed_time), migrator_output_handler::VERBOSITY_VERY_VERBOSE); + $this->output_handler->write(array('MIGRATION_DATA_IN_PROGRESS', $name, $elapsed_time), migrator_output_handler_interface::VERBOSITY_VERY_VERBOSE); } } catch (\phpbb\db\migration\exception $e) diff --git a/phpBB/phpbb/db/migration/null_migrator_output_handler.php b/phpBB/phpbb/db/null_migrator_output_handler.php index bb3aabed45..0e8cfbb049 100644 --- a/phpBB/phpbb/db/migration/null_migrator_output_handler.php +++ b/phpBB/phpbb/db/null_migrator_output_handler.php @@ -13,7 +13,7 @@ namespace phpbb\db; -class null_migrator_output_handler +class null_migrator_output_handler implements migrator_output_handler_interface { /** * {@inheritdoc} |