Menu

← Back to all error identifiers

Error Identifiers: phpunit.*

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

  • phpunit.assertCount phpstan-phpunit
    assertSame() with count() should be replaced with assertCount().
  • phpunit.assertEmpty phpstan-phpunit
    Calling PHPUnit's assertEmpty() or assertNotEmpty() is disallowed in favour of a more strict assertion.
  • phpunit.assertEquals phpstan-phpunit
    assertEquals() with same-type scalars should use assertSame() instead.
  • phpunit.assertFalse phpstan-phpunit
    assertSame(false, ...) should be replaced with assertFalse().
  • phpunit.assertNull phpstan-phpunit
    assertSame(null, ...) should be replaced with assertNull().
  • phpunit.assertTrue phpstan-phpunit
    assertSame(true, ...) should be replaced with assertTrue().
  • RequiresPhp or RequiresPhpunit attribute has an invalid, incomplete, or unsatisfiable version requirement.
  • phpunit.callParent phpstan-phpunit
    Overridden setUp() or tearDown() does not call the parent method.
  • phpunit.covers phpstan-phpunit
    @covers annotation references an invalid or non-existent symbol.
  • phpunit.coversClass phpstan-phpunit
    @coversDefaultClass references a class that does not exist.
  • phpunit.coversDuplicate phpstan-phpunit
    Duplicate @covers annotation is redundant with the class-level annotation.
  • phpunit.coversInterface phpstan-phpunit
    @covers annotation references an interface which has no executable code.
  • phpunit.coversMethod phpstan-phpunit
    @covers annotation references a method that does not exist on the class.
  • phpunit.dataProviderClass phpstan-phpunit
    Data provider references a class that does not exist.
  • phpunit.dataProviderMethod phpstan-phpunit
    Data provider references a method that does not exist on the test class.
  • phpunit.dataProviderPublic phpstan-phpunit
    Data provider method is not public.
  • phpunit.dataProviderStatic phpstan-phpunit
    Data provider method is not static, which is required by PHPUnit 10+.
  • phpunit.invalidPhpDoc phpstan-phpunit
    PHPUnit annotation is missing a space between the tag name and its value.
  • phpunit.mockMethod phpstan-phpunit
    Mock method() call references a method that does not exist on the mocked class.
Theme
A
© 2026 PHPStan s.r.o.