Open Tigerman55 opened 11 months ago
I have same issue:
throws PossiblyUnusedMethod
:
#[Test]
public function it_gets_orm_from_facade_when_container_has_orm(): void
{
...
}
works:
/**
* @test
*/
#[Test]
public function it_gets_orm_from_facade_when_container_has_orm(): void
{
}
Duplicate issue: https://github.com/psalm/psalm-plugin-phpunit/issues/131
The fix would be somewhere near these lines: https://github.com/psalm/psalm-plugin-phpunit/blob/e344eaaa27871e79c6cb97b9efe52a735f9d1966/src/Hooks/TestCaseHandler.php#L155-L160
@weirdan Thanks for this tip! I have created PR: https://github.com/psalm/psalm-plugin-phpunit/pull/145
I have tested it manually, on my code.
Please give suggestions, what do I need to change/add to get this merged.
If I use the attribute
#[Test]
instead oftestSomething()
, the errorPossiblyUnusedMethod
is not suppressed.