Bug Report
| Subject |
Details |
| Rector version |
last dev-main |
| Installed as |
composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/442c80c1-aae0-4ee6-aacb-c3dec50e5db4
<?php
// PreferPHPUnitSelfCallRector
final class DemoFile extends \PHPUnit\Framework\TestCase
{
public function testSuccess(): void
{
$mock = $this->createMock(\stdClass::class);
$this->assertTrue(true);
}
}
Responsible rules
Expected Behavior
Rector should change to use self only static methods, not all of them.
createMock method is not static