Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bf1f6c5

Browse filesBrowse 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
Copy full SHA for bf1f6c5

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎console.rst

Copy file name to clipboardExpand all lines: console.rst
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.