maks_rafalko,
@maks_rafalko@mastodon.social avatar

Is there a rector / php-cs-fixer rule that automatically adds #[CoversClass(ClassName::class)] to a new test and guesses ClassName based on a test class name?

I'm aware of https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.14.4/doc/rules/php_unit/php_unit_test_class_requires_covers.rst but this is not what is needed.

What I need is on the screeshot

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines