diff --git a/src/Rector/Class_/PreferPHPUnitSelfCallRector.php b/src/Rector/Class_/PreferPHPUnitSelfCallRector.php index 4d726778..275e619a 100644 --- a/src/Rector/Class_/PreferPHPUnitSelfCallRector.php +++ b/src/Rector/Class_/PreferPHPUnitSelfCallRector.php @@ -91,7 +91,7 @@ public function refactor(Node $node): ?Node return null; } - if (! $this->nodeNameResolver->matchesStringName($node->name, 'assert*')) { + if (! $this->nodeNameResolver->matchesStringName($methodName, 'assert*')) { return null; }