rules([TestListenerToHooksRector::class, ExplicitPhpErrorApiRector::class, SpecificAssertContainsWithoutIdentityRector::class, WithConsecutiveRector::class]); $rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [ // see https://github.com/sebastianbergmann/phpunit/issues/3957 new MethodCallRename('PHPUnit\\Framework\\TestCase', 'expectExceptionMessageRegExp', 'expectExceptionMessageMatches'), ]); };