Turns getMock*() methods to createMock()
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
public function test()
{
- $classMock = $this->getMock("Class");
+ $classMock = $this->createMock("Class");
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\PHPUnit50\Rector\StaticCall\GetMockRector;
return RectorConfig::configure()
->withRules([
GetMockRector::class,
]);