We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TestCase::assertEquals(false, '0')
currently produces:
Failed asserting that '0' matches expected false.
and does NOT match the php weak comparison: https://3v4l.org/qQkXC
also $this->assertEquals(false, 0) passes, so TestCase::assertEquals(false, '0') should pass too and be consistent
$this->assertEquals(false, 0)
The text was updated successfully, but these errors were encountered:
changing https://github.com/sebastianbergmann/comparator/blob/main/src/ScalarComparator.php#L61 to
- if (is_string($expected) || is_string($actual)) { + if ((is_string($expected) && !is_bool($actual)) || (is_string($actual) && !is_bool($expected))) {
fixes the issue for me
Sorry, something went wrong.
'0'
false
No branches or pull requests
Summary
currently produces:
and does NOT match the php weak comparison: https://3v4l.org/qQkXC
also
$this->assertEquals(false, 0)
passes, soTestCase::assertEquals(false, '0')
should pass too and be consistentThe text was updated successfully, but these errors were encountered: