Replace at() method call with desired matcher
-$mock->expects($this->at(0))
+$mock->expects($this->never())
->method('foo')
->willReturn('1');
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\PHPUnit90\Rector\MethodCall\ReplaceAtMethodWithDesiredMatcherRector;
return RectorConfig::configure()
->withRules([
ReplaceAtMethodWithDesiredMatcherRector::class,
]);