-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Attribute] Add CoversTrait support on CoversAnnotationWithValueToAtt…
…ributeRector
- Loading branch information
1 parent
c0b4dfb
commit 3927031
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...tes/Rector/Class_/CoversAnnotationWithValueToAttributeRector/Fixture/covers_trait.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Rector\PHPUnit\Tests\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector\Fixture; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @covers \Rector\PHPUnit\Tests\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector\Source\ExistingTrait | ||
*/ | ||
final class CoversTrait extends TestCase | ||
{ | ||
public function test() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\PHPUnit\Tests\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector\Fixture; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
#[\PHPUnit\Framework\Attributes\CoversTrait(\Rector\PHPUnit\Tests\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector\Source\ExistingTrait::class)] | ||
final class CoversTrait extends TestCase | ||
{ | ||
public function test() | ||
{ | ||
} | ||
} | ||
|
||
?> |
19 changes: 19 additions & 0 deletions
19
...ributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector/Source/ExistingTrait.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Rector\PHPUnit\Tests\AnnotationsToAttributes\Rector\Class_\CoversAnnotationWithValueToAttributeRector\Source; | ||
|
||
trait ExistingTrait | ||
{ | ||
public function __construct() | ||
{ | ||
} | ||
|
||
public function foo(): void | ||
{ | ||
} | ||
|
||
public function bar(): void | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters