rector-phpunit icon indicating copy to clipboard operation
rector-phpunit copied to clipboard

AddCoversClassAttributeRector with Tests & Unit or Functional subnamespaces

Open kochen opened this issue 11 months ago • 1 comments

Hey @maks-rafalko

In your implementation AddCoversClassAttributeRector rule, you mention the (not-yet? 🤞 ) supported case of different subnamespaces.

We have a case where the classes are: BoundedContext\Sub\Domain\ClassName And its tests are in both:

  • Tests\Unit\BoundedContext\Sub\Domain\ClassName
  • Tests\Integration\BoundedContext\Sub\Domain\ClassName

All the tests, already contain the annotation:

/**
 * @covers \BoundedContext\Sub\Domain\ClassName
 */

But having ~500 tests, it'd be impossible to manually change all these.

Would there be any way to add support for these cases?

Thanks, M.

kochen avatar Feb 08 '25 19:02 kochen