File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
tests/Rule/data/DeadMethodRule/providers Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,6 @@ public function getEntrypoints(ClassReflection $classReflection): array
43
43
$ entrypoints = [];
44
44
45
45
foreach ($ classReflection ->getNativeReflection ()->getMethods () as $ method ) {
46
- if ($ method ->getDeclaringClass ()->getName () !== $ classReflection ->getName ()) {
47
- continue ;
48
- }
49
-
50
46
$ dataProviders = array_merge (
51
47
$ this ->getDataProvidersFromAnnotations ($ method ->getDocComment ()),
52
48
$ this ->getDataProvidersFromAttributes ($ method ),
Original file line number Diff line number Diff line change @@ -80,3 +80,21 @@ public function beforeAnnotation(): void
80
80
}
81
81
82
82
}
83
+
84
+ abstract class TestCaseBase extends TestCase
85
+ {
86
+ abstract public static function providerTest (): array ;
87
+
88
+ #[DataProvider('providerTest ' )]
89
+ public function testFoo (string |null $ phpValue , string |null $ serialized ): void
90
+ {
91
+ }
92
+ }
93
+
94
+ final class SomeExtendingTest extends TestCaseBase
95
+ {
96
+ public static function providerTest (): array
97
+ {
98
+ return [];
99
+ }
100
+ }
You can’t perform that action at this time.
0 commit comments