File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1111 */
1212class DataProviderDeclarationRuleTest extends RuleTestCase
1313{
14- private int $ phpunitVersion ;
14+ private ? int $ phpunitVersion ;
1515
1616 protected function getRule (): Rule
1717 {
@@ -73,9 +73,12 @@ public function testRule(): void
7373 ]);
7474 }
7575
76- public function testRulePhpUnit9 (): void
76+ /**
77+ * @dataProvider provideVersion
78+ */
79+ public function testRulePhpUnit9orUnknown (?int $ version ): void
7780 {
78- $ this ->phpunitVersion = 9 ;
81+ $ this ->phpunitVersion = $ version ;
7982
8083 $ this ->analyse ([__DIR__ . '/data/data-provider-declaration.php ' ], [
8184 [
@@ -97,6 +100,12 @@ public function testRulePhpUnit9(): void
97100 ]);
98101 }
99102
103+ public function provideVersion (): iterable
104+ {
105+ yield [9 ];
106+ yield [null ];
107+ }
108+
100109 public function testFixDataProviderStatic (): void
101110 {
102111 $ this ->phpunitVersion = 10 ;
You can’t perform that action at this time.
0 commit comments