-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
[Phpunit] AssertEqualsToSameRector fails if markTest* exists in function #5799
Labels
Comments
Thank you for your report and demo link! Could you send a failing test case in a pull-request, so we have it covered in Rector? |
Bl00D4NGEL
changed the title
[Phpunit] AssertPropertyExistsRector fails if markTest* exists in function
[Phpunit] AssertEqualsToSameRector fails if markTest* exists in function
Mar 8, 2021
Changed the title of the issue as I was confusing rectors. Created #5800 for the test fixtures |
Issue fixed with #5800 |
Thank you 👏 |
TomasVotruba
added a commit
that referenced
this issue
Apr 3, 2024
rectorphp/rector-src@8e022d1 ArgumentRemoverRectorTest: replace symfony\yaml reference with dummy (#5799)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
It seems that the AssertPropertyExistsRector fails if a markTestIncomplete or markTestSkipped is present in the (test) function it tries to refactor. The error is
Uncaught Error: Call to a member function getType() on null in <path-to-vendor>/rector/rector-prefixed/rules/phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php:92
which is the return in this code snippet:Minimal PHP Code Causing Issue
https://getrector.org/demo/e3267adc-56d3-4fc6-a1d3-7c46c71d256a
Expected Behaviour
No error is thrown, refactor for assertEquals -> assertSame should still be applied
The text was updated successfully, but these errors were encountered: