Run Rector on your code to see what it can do for you:
<?php namespace App {
use App\SomeTrait; use PHPUnit\Framework\TestCase; - /** - * @covers \App\SomeTrait - */ + #[\PHPUnit\Framework\Attributes\CoversTrait(\App\SomeTrait::class)] + #[\PHPUnit\Framework\Attributes\CoversMethod(\App\OtherStuff::class, 'Inject')] final class SomeTraitTest extends TestCase { - /** - * @covers \App\OtherStuff::Inject - */ public function testYourThinks(): void {} } }
Applied Rules:
Not a change you expect?
rector.php