Error Identifiers: phpunit.*

Menu

← Back to all error identifiers

There are 18 error identifiers in the phpunit.* group:

  • assertSame() with count() should be replaced with assertCount().

  • assertEquals() with same-type scalars should use assertSame() instead.

  • assertSame(false, ...) should be replaced with assertFalse().

  • assertSame(null, ...) should be replaced with assertNull().

  • assertSame(true, ...) should be replaced with assertTrue().

  • RequiresPhp attribute needs a comparison operator before the version number.

  • Overridden setUp() or tearDown() does not call the parent method.

  • @covers annotation references an invalid or non-existent symbol.

  • @coversDefaultClass references a class that does not exist.

  • Duplicate @covers annotation is redundant with the class-level annotation.

  • @covers annotation references an interface which has no executable code.

  • @covers annotation references a method that does not exist on the class.

  • Data provider references a class that does not exist.

  • Data provider references a method that does not exist on the test class.

  • Data provider method is not public.

  • Data provider method is not static, which is required by PHPUnit 10+.

  • PHPUnit annotation is missing a space between the tag name and its value.

  • Mock method() call references a method that does not exist on the mocked class.