-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
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
assertEqualsCanonicalizing() doesn't compare keys #5019
Comments
Honestly, this bug plus the lack of another function like Nevertheless, thank you so much for writing and maintaining PHPUnit! |
This seems not to be an issue in PHPUnit 10 anymore, the assertion from report:
results now with:
|
The issue appears to be back in PHPUnit 11.1.1 (using PHP 8.2.1). |
Please see #5967. |
Summary
The following assertion passes:
The docs for this assertion at https://docs.phpunit.de/en/9.6/assertions.html#assertequalscanonicalizing don't mention associative arrays explicitly, but they don't say that assertEqualsCanonicalizing() is only intended for indexed arrays.
Current behavior
The assertion passes / the docs are incorrect.
How to reproduce
Expected behavior
I would say that the assertion should fail. But if it's by design that it passes, the docs need to mention this.
The text was updated successfully, but these errors were encountered: