Changes ->with() to more specific method
class SomeClass extends PHPUnit\Framework\TestCase
{
public function test()
{
$translator = $this->createMock('SomeClass');
$translator->expects($this->any())
->method('trans')
- ->with($this->equalTo('old max {{ max }}!'));
+ ->with('old max {{ max }}!');
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\UseSpecificWithMethodRector;
return RectorConfig::configure()
->withRules([
UseSpecificWithMethodRector::class,
]);