Skip to content

Commit

Permalink
[ticket/14895] Fix broken tests
Browse files Browse the repository at this point in the history
PHPBB3-14895
  • Loading branch information
iMattPro committed Dec 9, 2016
1 parent cbf6d71 commit 6a5b99b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions phpBB/phpbb/console/command/cron/cron_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ protected function execute(InputInterface $input, OutputInterface $output)

if (!empty($ready_tasks))
{
$io->section($this->user->lang('TASKS_READY'));
$io->title($this->user->lang('TASKS_READY'));
$io->listing($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);
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/console/cron/cron_list_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ public function test_no_task()
public function test_only_ready()
{
$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()
{
$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()
{
$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)
Expand Down

0 comments on commit 6a5b99b

Please sign in to comment.