Add @see annotation test of the class for faster jump to test. Make it FQN, so it stays in the annotation, not in the PHP source code.
+/**
+ * @see \SomeServiceTest
+ */
class SomeService
{
}
use PHPUnit\Framework\TestCase;
class SomeServiceTest extends TestCase
{
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
return RectorConfig::configure()
->withRules([
AddSeeTestAnnotationRector::class,
]);