1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

[ticket/16549] Move from assert[Not]Contains to assertString[Not]ContainsString

PHPBB3-16549
This commit is contained in:
rxu
2020-07-13 13:45:12 +07:00
parent ff5bbda0f4
commit d7cb104fc1
49 changed files with 292 additions and 280 deletions

View File

@@ -99,7 +99,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case
$command_tester = $this->get_command_tester();
$exit_status = $command_tester->execute(array('command' => $this->command_name, '--verbose' => true));
$this->assertContains('RUNNING_TASK', $command_tester->getDisplay());
$this->assertStringContainsString('RUNNING_TASK', $command_tester->getDisplay());
$this->assertSame(true, $this->task->executed);
$this->assertSame(0, $exit_status);
$this->assertSame(false, $this->lock->owns_lock());
@@ -115,7 +115,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case
$command_tester = $this->get_command_tester();
$exit_status = $command_tester->execute(array('command' => $this->command_name));
$this->assertContains('CRON_LOCK_ERROR', $command_tester->getDisplay());
$this->assertStringContainsString('CRON_LOCK_ERROR', $command_tester->getDisplay());
$this->assertSame(false, $this->task->executed);
$this->assertSame(1, $exit_status);
}
@@ -209,7 +209,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case
$command_tester = $this->get_command_tester();
$exit_status = $command_tester->execute(array('command' => $this->command_name, '--verbose' => true));
$this->assertContains('CRON_NO_TASK', $command_tester->getDisplay());
$this->assertStringContainsString('CRON_NO_TASK', $command_tester->getDisplay());
$this->assertSame(0, $exit_status);
$this->assertSame(false, $this->lock->owns_lock());
}
@@ -234,7 +234,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case
$command_tester = $this->get_command_tester();
$exit_status = $command_tester->execute(array('command' => $this->command_name, 'name' => 'foo'));
$this->assertContains('CRON_NO_SUCH_TASK', $command_tester->getDisplay());
$this->assertStringContainsString('CRON_NO_SUCH_TASK', $command_tester->getDisplay());
$this->assertSame(false, $this->task->executed);
$this->assertSame(2, $exit_status);
$this->assertSame(false, $this->lock->owns_lock());
@@ -245,7 +245,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case
$command_tester = $this->get_command_tester();
$exit_status = $command_tester->execute(array('command' => $this->command_name, 'name' => 'phpbb_cron_task_simple', '--verbose' => true));
$this->assertContains('RUNNING_TASK', $command_tester->getDisplay());
$this->assertStringContainsString('RUNNING_TASK', $command_tester->getDisplay());
$this->assertSame(true, $this->task->executed);
$this->assertSame(0, $exit_status);
$this->assertSame(false, $this->lock->owns_lock());