Skip to content

Commit

Permalink
patch RemoveEmptyTestMethodRector
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Sep 10, 2023
1 parent b9c5aca commit e3b0e1c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit e3b0e1c

Please sign in to comment.