Skip to content

Commit

Permalink
Add rule to check @dataProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa committed Dec 7, 2022
1 parent b906029 commit 349b03d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions src/Rules/PHPUnit/DataProviderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ public function processDataProvider(
))->build();
}

if (!$dataProviderMethodReflection->isStatic()) {
$errors[] = RuleErrorBuilder::message(sprintf(
'@dataProvider %s related method must be static.',
$dataProviderName
))->build();
}

return $errors;
}

Expand Down
4 changes: 0 additions & 4 deletions tests/Rules/PHPUnit/DataProviderDeclarationRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ public function testRule(): void
'@dataProvider providebaz related method is used with incorrect case: provideBaz.',
13,
],
[
'@dataProvider provideQux related method must be static.',
13,
],
[
'@dataProvider provideQuux related method must be public.',
13,
Expand Down

0 comments on commit 349b03d

Please sign in to comment.