[6.x] Fix boolean value in assertSessionHasErrors #32555
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHPUnit 9 changes comparisons in
assertContains
to strict which means if you pass a boolean value it won't get matched against the converted"1"
or"0"
value. If we convert boolean values beforehand to strings (since we can only compare strings anyway here) we should be good.Sent this to 6.x for the LTS support but the TestResponse class was moved to the new Testing component in 7.x so we'll need to make sure the fix also gets applied there after merging 6.x into the 7.x branch.
Fixes #32541