Skip to content

[6.x] Fix boolean value in assertSessionHasErrors - #32555

Merged
taylorotwell merged 2 commits into
6.xfrom
fix-boolean-value-assert-errors
Apr 27, 2020
Merged

[6.x] Fix boolean value in assertSessionHasErrors#32555
taylorotwell merged 2 commits into
6.xfrom
fix-boolean-value-assert-errors

Conversation

@driesvints

Copy link
Copy Markdown
Member

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

@taylorotwell
taylorotwell merged commit 01be623 into 6.x Apr 27, 2020
@driesvints
driesvints deleted the fix-boolean-value-assert-errors branch April 27, 2020 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants