-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] Fix expectDeprecation() in isolation #37515
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
[PhpUnitBridge] Fix expectDeprecation() in isolation #37515
Conversation
The problem with the fix is that now the assertion count is wrong for tests not run in a separate process. For example:
Before this change it was |
0e1e77a
to
c781eeb
Compare
Actually this has unearthed a significant but in the symfony expectDeprecation method in isolated tests - if you change the expectation to any value it'll still work because essentially the expectation is ignored.
will happily pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for working on this!
src/Symfony/Bridge/PhpUnit/Legacy/ExpectDeprecationTraitBeforeV8_4.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/PhpUnit/Legacy/ExpectDeprecationTraitForV8_4.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/PhpUnit/FailTests/ExpectDeprecationTraitFailTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/PhpUnit/Tests/FailTests/ExpectDeprecationTraitTestFail.php
Outdated
Show resolved
Hide resolved
Thank you @alexpott. |
c6a5d7c
to
e7e2ee7
Compare
Tests like
will fail due to: