Skip to content

Commit 349b03d

Browse files
committed
Add rule to check @dataProvider
1 parent b906029 commit 349b03d

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

Diff for: src/Rules/PHPUnit/DataProviderHelper.php

-7
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,6 @@ public function processDataProvider(
8787
))->build();
8888
}
8989

90-
if (!$dataProviderMethodReflection->isStatic()) {
91-
$errors[] = RuleErrorBuilder::message(sprintf(
92-
'@dataProvider %s related method must be static.',
93-
$dataProviderName
94-
))->build();
95-
}
96-
9790
return $errors;
9891
}
9992

Diff for: tests/Rules/PHPUnit/DataProviderDeclarationRuleTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ public function testRule(): void
2727
'@dataProvider providebaz related method is used with incorrect case: provideBaz.',
2828
13,
2929
],
30-
[
31-
'@dataProvider provideQux related method must be static.',
32-
13,
33-
],
3430
[
3531
'@dataProvider provideQuux related method must be public.',
3632
13,

0 commit comments

Comments
 (0)