Browse Source

Fix assert string contains

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/6349/head
Joas Schilling 4 years ago
parent
commit
c3c93a61b0
No known key found for this signature in database GPG Key ID: 7076EA9751AACDDA
  1. 8
      tests/integration/features/bootstrap/CommandLineTrait.php

8
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');
}
}
Loading…
Cancel
Save