-
Notifications
You must be signed in to change notification settings - Fork 63
Only remove @covers when target exists #494
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
Conversation
|
It seems cause phpunit notice: @TimelessTron could you verify the use of |
|
Let's remove |
|
@TimelessTron I tested manually on phpunit 10, and it seems still remove whole + #[\PHPUnit\Framework\Attributes\CoversClass(\App\SomeException::class)]
final class SomeTraitTest extends TestCase
{
- /**
- * @covers \App\OtherStuff::Inject
- * @covers \App\SomeException
- */
- public function testYourThinks(): void
+ public function testYourThinks(): void
{} |
| if (str_contains($desiredTagValueNode->value->value, '::') && ! $this->reflectionProvider->hasClass(self::COVERS_METHOD_ATTRIBUTE)) { | ||
| continue; | ||
| } |
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.
this one seems can cover it, I am thinking of moving CoversTrait and CoversMethod to phpunit 11 rule tho, but that will be need in separate PR
|
I rolled back remove |
|
Let's merge so we have faster feedback. |
|
Github status is delay https://www.githubstatus.com/ |
Pull request was closed
@TimelessTron this should ensure only remove when attribute group added.
Ref rectorphp/rector#9183 (comment)