rectorphp / rector-phpunit

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

Update assertion name for AssertTrueFalseToSpecificMethodRector #144

Closed GeniJaho closed 1 year ago

GeniJaho commented 1 year ago

Fixes https://github.com/rectorphp/rector/issues/7626.

samsonasik commented 1 year ago

is this tied to specific start from version phpunit? eg: it start from phpunit 9.1, then it needs to be in phpunit91 config set.

GeniJaho commented 1 year ago

There is actually a rule in the phpunit91 set that renames the method to assertFileDoesNotExist, so this change is not even needed, probably?

samsonasik commented 1 year ago

Probably just keep as is, and add new MethodCallRename in phpunit91 config:

        new MethodCallRename('PHPUnit\Framework\Assert', 'assertFileNotExists', 'assertFileDoesNotExist'),
GeniJaho commented 1 year ago

It's already there 😁 so I'm closing this PR. https://github.com/rectorphp/rector-phpunit/blob/main/config/sets/phpunit91.php#L19