mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-03 08:38:51 +00:00
[ticket/14895] Fix broken tests
PHPBB3-14895
This commit is contained in:
parent
cbf6d71f68
commit
6a5b99b12b
2 changed files with 5 additions and 5 deletions
|
@ -81,13 +81,13 @@ class cron_list extends \phpbb\console\command\command
|
||||||
|
|
||||||
if (!empty($ready_tasks))
|
if (!empty($ready_tasks))
|
||||||
{
|
{
|
||||||
$io->section($this->user->lang('TASKS_READY'));
|
$io->title($this->user->lang('TASKS_READY'));
|
||||||
$io->listing($ready_tasks);
|
$io->listing($ready_tasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($not_ready_tasks))
|
if (!empty($not_ready_tasks))
|
||||||
{
|
{
|
||||||
$io->section($this->user->lang('TASKS_NOT_READY'));
|
$io->title($this->user->lang('TASKS_NOT_READY'));
|
||||||
$io->listing($not_ready_tasks);
|
$io->listing($not_ready_tasks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,19 +50,19 @@ class phpbb_console_command_cron_list_test extends phpbb_test_case
|
||||||
public function test_only_ready()
|
public function test_only_ready()
|
||||||
{
|
{
|
||||||
$this->initiate_test(2, 0);
|
$this->initiate_test(2, 0);
|
||||||
$this->assertContains('TASKS_READY command1 command2', preg_replace('/\s+/', ' ', trim($this->command_tester->getDisplay())));
|
$this->assertContains('TASKS_READY command1 command2', preg_replace('/[\s*=]+/', ' ', trim($this->command_tester->getDisplay())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_only_not_ready()
|
public function test_only_not_ready()
|
||||||
{
|
{
|
||||||
$this->initiate_test(0, 2);
|
$this->initiate_test(0, 2);
|
||||||
$this->assertContains('TASKS_NOT_READY command1 command2', preg_replace('/\s+/', ' ', trim($this->command_tester->getDisplay())));
|
$this->assertContains('TASKS_NOT_READY command1 command2', preg_replace('/[\s*=]+/', ' ', trim($this->command_tester->getDisplay())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_both_ready()
|
public function test_both_ready()
|
||||||
{
|
{
|
||||||
$this->initiate_test(2, 2);
|
$this->initiate_test(2, 2);
|
||||||
$this->assertSame('TASKS_READY command1 command2 TASKS_NOT_READY command3 command4', preg_replace('/\s+/', ' ', trim($this->command_tester->getDisplay())));
|
$this->assertSame('TASKS_READY command1 command2 TASKS_NOT_READY command3 command4', preg_replace('/[\s*=]+/', ' ', trim($this->command_tester->getDisplay())));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_cron_manager(array $tasks)
|
public function get_cron_manager(array $tasks)
|
||||||
|
|
Loading…
Add table
Reference in a new issue