rectorphp / rector-phpunit

Rector upgrade rules for PHPUnit
http://getrector.com
MIT License
61 stars 46 forks source link

AddDoesNotPerformAssertionToNonAssertingTestRector is applying for tests, that have indirect assert #273

Closed eerison closed 9 months ago

eerison commented 9 months ago

Hello I don't know if it is an issue or a expect behaviour.

But there is some functions in codeception that contain indirect assert like this:
https://github.com/Codeception/module-doctrine2/blob/master/src/Codeception/Module/Doctrine2.php#L845

Should we prevent this in this rule? Because even I check inside of the function it could have assert just in low level like ->MethodA()->b()->c()..... or should I check one level only, if yes did you have any example, how to check this?

eerison commented 9 months ago

Ok let me check this again, I suspect that it is not working because this $this->assert, uses this lib, and as I do not have this it is not working

https://github.com/Codeception/module-asserts