Add missing parent::setUp() call on setUp() method on test class
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
protected function setUp(): void
{
+ parent::setUp();
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddParentSetupCallOnSetupRector;
return RectorConfig::configure()
->withRules([
AddParentSetupCallOnSetupRector::class,
]);