PHPUnit
- 'assertTrue()' with incompatible argument type
Reports the PHPUnit assertTrue() calls whose arguments are of incompatible types.
- Assertion can be replaced with 'assertEmpty/assertNotEmpty'
Reports the assertTrue/assertFalse usages that can be replaced with assertEmpty/assertNotEmpty in PHPUnit tests.
- Assertion can be replaced with 'assertTrue/assertFalse'
Reports the assertEquals() calls with the true/false arguments in PHPUnit tests.
- Assertion can be replaced with 'fail'
Reports the assertTrue()/assertFalse() calls with the false/true arguments in PHPUnit tests.
- Covered function reference is provided without ‘::’
Reports the references to functions/methods in the @covers PHPDoc tags that are not prepended with the scope resolution operator (::).
- Deprecated 'assertContains/assertNotContains' usage
Reports the deprecated assertContains() and assertNotContains() calls with the string $needle and $ignoreCase arguments.
- Deprecated 'assertEquals/assertNotEquals' usage
Reports deprecated usages of the assertEquals and assertNotEquals functions with $delta, $maxDepth, $canonicalize, and $ignoreCase parameters.
- Deprecated 'assertFileEquals/assertStringEqualsFile' usage
Reports the deprecated usages of the assertFileEquals, assertFileNotEquals, assertStringEqualsFile, and assertStringNotEqualsFile functions with the $canonicalize and $ignoreCase parameters.
- Deprecated @covers/@uses by access modifier annotation
Reports the @covers and @uses PHPUnit doc tags that are using ClassName::<*>.
- Deprecated exception handling via doc tags
Reports the usages of the following deprecated PHPUnit doc tags: @expectedException @expectedExceptionMessage @expectedExceptionCode @expectedExceptionMessageRegExp.
- Deprecated expectException usage
Reports deprecated usages of expectException().
- Deprecated usage of data provider since PHPUnit 10
Reports the references to functions/methods in the @dataProvider PHPDoc tag that are resolved to non-static or non-public methods.
- Failed line in test
Reports failed method calls or assertions in tests.
- Invalid Mockery mocking target
Reports the methods and classes that are incorrectly mocked in Mockery tests.
- Invalid PHPUnit mocking target
Reports the methods and classes that are incorrectly mocked in PHPUnit tests.
- Method 'assertArrayHasKey/assertArrayNotHasKey' can be used instead
Reports the assertTrue() and assertNotTrue() methods calls that are provided with an array_key_exists() call as an argument.
- Method is deprecated in PHPUnit 10
Reports the calls to the PHPUnit assertion methods that are removed in PHPUnit 10.
- Method is deprecated in PHPUnit 11
Reports calls to the PHPUnit test case methods that are removed in PHPUnit 11.
- Misordered PHPUnit equality assertion method arguments
Reports the calls to PHPUnit equality assertion methods (such as assertEquals(), assertNotEquals(), assertSame(), and so on) that have a non-literal as the expected result argument and a literal as the actual result argument.
- Missing target element for PHPUnit test
Reports the test classes and methods, for which no corresponding production classes or methods were found.
- PHPUnit annotation is deprecated in PHPUnit 11 and can be replaced with attribute
Suggests replacing PHPUnit annotations with attributes.
- Undefined PHPUnit data provider
Reports the references to functions/methods in the @dataProvider PHPDoc tag that are not resolved.
- Usage 'assertCount/assertSameSize' methods instead of assertEquals
Reports alternative usage of the assertEquals and assertNotEquals methods with count function as a parameter See Usage of the assertCount for details.