You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we use @test annotations to declare test methods, you may forgot to add the annotation, leading to the test method being silently ignored and not executed.
We could make fixer to make sure public method starting with "should" (which is our convention for test method names) have the @test annotation. (This must apply only to PHPUnit test files, ie. files having "Test.php" suffix).
Also make sure we cover case when @test annotation is wrongly declared (missing space - /**@test */) and thus undetected by PHPUnit as test method.
If we use
@test
annotations to declare test methods, you may forgot to add the annotation, leading to the test method being silently ignored and not executed.We could make fixer to make sure public method starting with "should" (which is our convention for test method names) have the
@test
annotation. (This must apply only to PHPUnit test files, ie. files having "Test.php" suffix).Also make sure we cover case when
@test
annotation is wrongly declared (missing space -/**@test */)
and thus undetected by PHPUnit as test method.Note - there is PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer, but it does only unifies the style, even with style set to "annotations", it won't detect methods missing the annotation.
The text was updated successfully, but these errors were encountered: