Skip to content

Commit

Permalink
Feat: Add PhpUnitFqcnAnnotationFixer
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed May 14, 2024
1 parent 1f5454b commit 3f2a451
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
use PhpCsFixer\Fixer\PhpUnit\PhpUnitDedicateAssertFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitDedicateAssertInternalTypeFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitExpectationFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitMockFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitMockShortWillReturnFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitNoExpectationAnnotationFixer;
Expand Down Expand Up @@ -390,6 +391,8 @@
PhpUnitNoExpectationAnnotationFixer::class,
// Usages of ->setExpectedException* methods MUST be replaced by ->expectException* methods
PhpUnitExpectationFixer::class,
// PHPUnit annotations should be a FQCNs including a root namespace.
PhpUnitFqcnAnnotationFixer::class,
// Visibility of setUp() and tearDown() method should be kept protected
PhpUnitSetUpTearDownVisibilityFixer::class,
// There should not be an empty `return` statement at the end of a function
Expand Down
3 changes: 3 additions & 0 deletions tests/Integration/Fixtures/PhpUnit.correct.php.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace Lmc\CodingStandard\Integration\Fixtures;

use PHPUnit\Framework\TestCase;

/**
* @covers \Lmc\CodingStandard\Integration\Fixtures\MyClass
*/
class PhpUnit extends TestCase
{
// PhpUnitSetUpTearDownVisibilityFixer
Expand Down
3 changes: 3 additions & 0 deletions tests/Integration/Fixtures/PhpUnit.wrong.php.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace Lmc\CodingStandard\Integration\Fixtures;

use PHPUnit\Framework\TestCase;

/**
* @covers Lmc\CodingStandard\Integration\Fixtures\MyClass
*/
class PhpUnit extends TestCase
{
// PhpUnitSetUpTearDownVisibilityFixer
Expand Down

0 comments on commit 3f2a451

Please sign in to comment.