Inspectopedia Help

PHPUnit

'assertTrue()' with incompatible argument type   New in this release

Reports the PHPUnit assertTrue() calls whose arguments are of incompatible types.

Assertion can be replaced with 'assertEmpty/assertNotEmpty'   New in this release

Reports the assertTrue/assertFalse usages that can be replaced with assertEmpty/assertNotEmpty in PHPUnit tests.

Assertion can be replaced with 'assertTrue/assertFalse'   New in this release

Reports the assertEquals() calls with the true/false arguments in PHPUnit tests.

Assertion can be replaced with 'fail'   New in this release

Reports the assertTrue()/assertFalse() calls with the false/true arguments in PHPUnit tests.

Covered function reference is provided without ‘::’   New in this release

Reports the references to functions/methods in the @covers PHPDoc tags that are not prepended with the scope resolution operator (::).

Deprecated 'assertContains/assertNotContains' usage   New in this release

Reports the deprecated assertContains() and assertNotContains() calls with the string $needle and $ignoreCase arguments.

Deprecated 'assertEquals/assertNotEquals' usage   New in this release

Reports deprecated usages of the assertEquals and assertNotEquals functions with $delta, $maxDepth, $canonicalize, and $ignoreCase parameters.

Deprecated 'assertFileEquals/assertStringEqualsFile' usage   New in this release

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   New in this release

Reports the @covers and @uses PHPUnit doc tags that are using ClassName::<*>.

Deprecated exception handling via doc tags   New in this release

Reports the usages of the following deprecated PHPUnit doc tags: @expectedException @expectedExceptionMessage @expectedExceptionCode @expectedExceptionMessageRegExp.

Deprecated expectException usage   New in this release

Reports deprecated usages of expectException().

Deprecated usage of data provider since PHPUnit 10   New in this release

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   New in this release

Reports the methods and classes that are incorrectly mocked in Mockery tests.

Invalid PHPUnit mocking target   New in this release

Reports the methods and classes that are incorrectly mocked in PHPUnit tests.

Method 'assertArrayHasKey/assertArrayNotHasKey' can be used instead   New in this release

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   New in this release

Reports the calls to the PHPUnit assertion methods that are removed in PHPUnit 10.

Method is deprecated in PHPUnit 11   New in this release

Reports calls to the PHPUnit test case methods that are removed in PHPUnit 11.

Misordered PHPUnit equality assertion method arguments   New in this release

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   New in this release

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   New in this release

Suggests replacing PHPUnit annotations with attributes.

Undefined PHPUnit data provider   New in this release

Reports the references to functions/methods in the @dataProvider PHPDoc tag that are not resolved.

Usage 'assertCount/assertSameSize' methods instead of assertEquals   New in this release

Reports alternative usage of the assertEquals and assertNotEquals methods with count function as a parameter See Usage of the assertCount for details.

Last modified: 11 September 2024