mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/13126] Fix tests
PHPBB3-13126
This commit is contained in:
parent
faf4b03c43
commit
981d3005f3
@ -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
|
||||
|
@ -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)
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
namespace phpbb\db;
|
||||
|
||||
class null_migrator_output_handler
|
||||
class null_migrator_output_handler implements migrator_output_handler_interface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
Loading…
x
Reference in New Issue
Block a user