diff options
author | Joas Schilling <coding@schilljs.com> | 2021-10-25 13:50:04 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-25 16:26:29 +0300 |
commit | c3c93a61b016fde973d2c6163bd6736ecfc1798f (patch) | |
tree | 019543a4fbabfea9587e7db6dc22d88c9f22bd95 /tests | |
parent | 7d1cd77a63f093c3efe091fee8bf9553369ac5a1 (diff) |
Fix assert string contains
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/features/bootstrap/CommandLineTrait.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/integration/features/bootstrap/CommandLineTrait.php b/tests/integration/features/bootstrap/CommandLineTrait.php index 31b5c5b93..e8e73ffd0 100644 --- a/tests/integration/features/bootstrap/CommandLineTrait.php +++ b/tests/integration/features/bootstrap/CommandLineTrait.php @@ -146,11 +146,11 @@ trait CommandLineTrait { */ public function theCommandOutputContainsTheText($text) { if ($this->lastStdOut === '' && $this->lastStdErr !== '') { - Assert::assertContains($text, $this->lastStdErr, 'The command did not output the expected text on stdout'); + Assert::assertStringContainsString($text, $this->lastStdErr, 'The command did not output the expected text on stdout'); Assert::assertTrue(false, 'The command did not output the expected text on stdout but stderr'); } - Assert::assertContains($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); + Assert::assertStringContainsString($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); } /** @@ -158,10 +158,10 @@ trait CommandLineTrait { */ public function theCommandErrorOutputContainsTheText($text) { if ($this->lastStdErr === '' && $this->lastStdOut !== '') { - Assert::assertContains($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); + Assert::assertStringContainsString($text, $this->lastStdOut, 'The command did not output the expected text on stdout'); Assert::assertTrue(false, 'The command did not output the expected text on stdout but stderr'); } - Assert::assertContains($text, $this->lastStdErr, 'The command did not output the expected text on stderr'); + Assert::assertStringContainsString($text, $this->lastStdErr, 'The command did not output the expected text on stderr'); } } |