Skip to content

Commit bf1f6c5

Browse files
committed
minor #16107 Fix assert statement (nacholibre)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Fix assert statement In my local version of phpunit 9.5.9 `$this->assertContains` has the following signature: ```php public static function assertContains($needle, iterable $haystack, string $message = ''): void { //.. } ``` Where `$commandTester->getDisplay();` returns string and the test fails with ``` TypeError: Argument 2 passed to PHPUnit\Framework\Assert::assertContains() must be iterable, string given, called in.. ``` Commits ------- 37d1373 Fix assert statement
2 parents 801670f + 37d1373 commit bf1f6c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ console::
376376

377377
// the output of the command in the console
378378
$output = $commandTester->getDisplay();
379-
$this->assertContains('Username: Wouter', $output);
379+
$this->assertStringContainsString('Username: Wouter', $output);
380380

381381
// ...
382382
}

0 commit comments

Comments
 (0)