diff --git a/rules/CodeQuality/Rector/ClassMethod/RemoveEmptyTestMethodRector.php b/rules/CodeQuality/Rector/ClassMethod/RemoveEmptyTestMethodRector.php index 9aded55a..7df5bd95 100644 --- a/rules/CodeQuality/Rector/ClassMethod/RemoveEmptyTestMethodRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/RemoveEmptyTestMethodRector.php @@ -8,6 +8,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\NodeTraverser; use Rector\Core\Rector\AbstractRector; +use Rector\Core\Util\StringUtils; use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -66,7 +67,7 @@ public function refactor(Node $node): ?int return null; } - if (! $this->isName($node->name, 'test*')) { + if (! StringUtils::isMatch($node->name->toString(), '#^test*#')) { return null; }