-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
I use phpstan for both my src/ and test/ folder.
But I want to use this extension only for my src folder.
I was expecting solving the issue with
exceptionRules:
methodWhitelist:
PHPUnit\Framework\TestCase: '##'
But I still getting error in my tests files.
Missing @throws ... annotation
I create a PR with failing tests #103 for the rule introduced by @marcospassos
public function testFoo(): void
{
throw new RuntimeException();
}
public function testFooBis(): void
{
$this->bar(); // throwing exceptions
}
SHOULD NOT return an error by phpstan
Plus, I don't agree with the Unused @throws RuntimeException annotation error for whitelist method. If I whitelist the method, I don't expect error if I'm a good guy who annotate the function.
That's why I add my proposal to fix the tests in the PR
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels