Fork me on GitHub
a Sensio Labs Product

BoY42 (v3.15.1) edition

Rule php_unit_test_class_requires_covers

Adds a default @coversNothing annotation to PHPUnit test classes that have no @covers* annotation.


Example #1

--- Original
+++ New
+ * @coversNothing
+ */
 final class MyTest extends \PHPUnit_Framework_TestCase
     public function testSomeTest()
         $this->assertSame(a(), b());

Rule sets

The rule is part of the following rule set:


Using the @PhpCsFixer rule set will enable the php_unit_test_class_requires_covers rule.

The logo is © 2010-2022 Sensio Labs