Skip to content

Commit d5c844c

Browse files
committed
added test
1 parent 1f0ab85 commit d5c844c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/Type/PHPUnit/DataProviderReturnTypeIgnoreExtensionTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ protected function getRule(): Rule
2020
public function testRule(): void
2121
{
2222
$this->analyse([__DIR__ . '/data/data-provider-iterable-value.php'], [
23+
[
24+
'Method DataProviderIterableValueTest\Foo::notADataProvider() return type has no value type specified in iterable type iterable.',
25+
32
26+
],
2327
]);
2428
}
2529

tests/Type/PHPUnit/data/data-provider-iterable-value.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,12 @@ public function dataProvider2(): iterable {
2828
[$i, 2],
2929
];
3030
}
31+
32+
public function notADataProvider(): iterable {
33+
return [
34+
[1, 2],
35+
[3, 4],
36+
[5, 6],
37+
];
38+
}
3139
}

0 commit comments

Comments
 (0)