diff --git a/tests/phpunit/installation_test.php b/tests/phpunit/installation_test.php index d0636ae..49ed6b0 100644 --- a/tests/phpunit/installation_test.php +++ b/tests/phpunit/installation_test.php @@ -71,7 +71,7 @@ class installation_test extends auth_outage_base_testcase { $progress = new progress_trace_buffer(new text_progress_trace(), false); core_plugin_manager::instance()->uninstall_plugin('auth_outage', $progress); $progress->finished(); - self::assertContains('++ Success ++', $progress->get_buffer()); + self::assertStringContainsString('++ Success ++', $progress->get_buffer()); // Check ... self::assertSame(0, $DB->count_records_select('event', "eventtype = 'auth_outage'", null), diff --git a/tests/phpunit/local/cli/cli_test.php b/tests/phpunit/local/cli/cli_test.php index d589ccf..4cab5c6 100644 --- a/tests/phpunit/local/cli/cli_test.php +++ b/tests/phpunit/local/cli/cli_test.php @@ -81,8 +81,8 @@ class cli_test extends auth_outage_cli_testcase { $this->set_parameters(['-h']); $cli = new create(); $output = $this->execute($cli); - self::assertContains('-h', $output); - self::assertContains('--help', $output); + self::assertStringContainsString('-h', $output); + self::assertStringContainsString('--help', $output); } /** diff --git a/tests/phpunit/local/cli/create_test.php b/tests/phpunit/local/cli/create_test.php index 4e8d707..e944bce 100644 --- a/tests/phpunit/local/cli/create_test.php +++ b/tests/phpunit/local/cli/create_test.php @@ -120,8 +120,8 @@ class create_test extends auth_outage_cli_testcase { $this->set_parameters(['--help']); $cli = new create(); $output = $this->execute($cli); - self::assertContains('Creates', $output); - self::assertContains('--help', $output); + self::assertStringContainsString('Creates', $output); + self::assertStringContainsString('--help', $output); } /** @@ -157,7 +157,7 @@ class create_test extends auth_outage_cli_testcase { $cli = new create(); $cli->set_referencetime($now); $text = $this->execute($cli); - self::assertContains('created', $text); + self::assertStringContainsString('created', $text); // Check creted outage. list(, $id) = explode(':', $text); $id = (int)$id; @@ -221,7 +221,7 @@ class create_test extends auth_outage_cli_testcase { 'description' => 'Default Description', ]); $text = $this->execute($cli); - self::assertContains('created', $text); + self::assertStringContainsString('created', $text); // Check creted outage. list(, $id) = explode(':', $text); $id = (int)$id; @@ -299,8 +299,8 @@ class create_test extends auth_outage_cli_testcase { $cli = new create(); $cli->set_referencetime($now); $text = $this->execute($cli); - self::assertContains('created', $text); - self::assertContains('started', $text); + self::assertStringContainsString('created', $text); + self::assertStringContainsString('started', $text); } /** diff --git a/tests/phpunit/local/cli/finish_test.php b/tests/phpunit/local/cli/finish_test.php index ee97767..a2c290d 100644 --- a/tests/phpunit/local/cli/finish_test.php +++ b/tests/phpunit/local/cli/finish_test.php @@ -72,8 +72,8 @@ class finish_test extends auth_outage_cli_testcase { $this->set_parameters(['--help']); $cli = new finish(); $text = $this->execute($cli); - self::assertContains('Finishes', $text); - self::assertContains('--help', $text); + self::assertStringContainsString('Finishes', $text); + self::assertStringContainsString('--help', $text); } /** diff --git a/tests/phpunit/local/cli/waitforit_test.php b/tests/phpunit/local/cli/waitforit_test.php index 419e8be..9b0d93c 100644 --- a/tests/phpunit/local/cli/waitforit_test.php +++ b/tests/phpunit/local/cli/waitforit_test.php @@ -78,8 +78,8 @@ class waitforit_test extends auth_outage_cli_testcase { $this->set_parameters(['--help']); $cli = new waitforit(); $text = $this->execute($cli); - self::assertContains('Waits', $text); - self::assertContains('--help', $text); + self::assertStringContainsString('Waits', $text); + self::assertStringContainsString('--help', $text); } /** @@ -151,9 +151,9 @@ class waitforit_test extends auth_outage_cli_testcase { $cli = new waitforit(); $cli->set_referencetime($now); $output = $this->execute($cli); - self::assertContains('Verbose mode', $output); - self::assertContains('starting in 1 sec', $output); - self::assertContains('started', $output); + self::assertStringContainsString('Verbose mode', $output); + self::assertStringContainsString('starting in 1 sec', $output); + self::assertStringContainsString('started', $output); } /** @@ -178,11 +178,11 @@ class waitforit_test extends auth_outage_cli_testcase { return $now; }); $output = $this->execute($cli); - self::assertContains("starting in 45", $output); - self::assertContains("sleep 30 second", $output); - self::assertContains("starting in 15", $output); - self::assertContains("sleep 15 second", $output); - self::assertContains("started!", $output); + self::assertStringContainsString("starting in 45", $output); + self::assertStringContainsString("sleep 30 second", $output); + self::assertStringContainsString("starting in 15", $output); + self::assertStringContainsString("sleep 15 second", $output); + self::assertStringContainsString("started!", $output); } /** diff --git a/tests/phpunit/local/controllers/infopage_test.php b/tests/phpunit/local/controllers/infopage_test.php index bcaf9a4..881320f 100644 --- a/tests/phpunit/local/controllers/infopage_test.php +++ b/tests/phpunit/local/controllers/infopage_test.php @@ -103,7 +103,7 @@ class infopagecontroller_test extends auth_outage_base_testcase { ]); $info = new infopage(['outage' => $outage]); $output = $info->get_output(); - self::assertContains('auth_outage_info', $output); + self::assertStringContainsString('auth_outage_info', $output); } /** diff --git a/tests/phpunit/local/controllers/maintenance_static_page_test.php b/tests/phpunit/local/controllers/maintenance_static_page_test.php index cd8f575..fffdfad 100644 --- a/tests/phpunit/local/controllers/maintenance_static_page_test.php +++ b/tests/phpunit/local/controllers/maintenance_static_page_test.php @@ -104,9 +104,9 @@ class maintenance_static_page_test extends auth_outage_base_testcase { '
Content