New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DX: fix checking test class extends PhpCsFixer\Tests\TestCase
#7567
DX: fix checking test class extends PhpCsFixer\Tests\TestCase
#7567
Conversation
tests/AutoReview/ProjectCodeTest.php
Outdated
@@ -309,6 +316,12 @@ public static function provideDataProviderMethodCases(): iterable | |||
*/ | |||
public function testThatTestClassCoversAreCorrect(string $testClassName): void | |||
{ | |||
if (DocumentationTest::class === $testClassName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this class cannot have cover annotation tested ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1) PhpCsFixer\Tests\AutoReview\ProjectCodeTest::testThatTestClassCoversAreCorrect with data set #7 ('PhpCsFixer\Tests\AutoReview\D...onTest')
Class "\PhpCsFixer\AutoReview\Documentation" does not exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hint: this exception is not intuutive. When doing any exceptions for some of the tests , provide in-code comment with reason. Otherwise John doe will not be aware why it's needed (and fact that "if they remove hack tests will fail so they will not remove the hack" is not helping them to understand why we have it in first place)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought whoever could be interested can go to DocumentationTest
and see the @covers
there.
However, let's get rid of the exception and update @covers
for DocumentationTest
.
@@ -848,7 +861,7 @@ private static function getTestClasses(): array | |||
|
|||
$finder = Finder::create() | |||
->files() | |||
->name('*.php') | |||
->name('*Test.php') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
No description provided.