Imagine a Test class, let's call it A, extending some other (potentially) abstract Test class, B, that has defined example dataProvider methods and class A is using data providers from class B.
This makes DataProviderClassMethodFinder throw exception as the docblock referenced method is not contained in the same class.
The simplest solution would be to change exception throwing into a continue step, disadvantage is that the extended class method won't be recognized as a data provider - but this is already happening for the base class that provides the data provider methods only 🙈.
Very basic code sample
```php
abstract class SomeAbstractTest extends TestCase
{
public function provideData()
{
yield [1];
}
}
final class SomeTest extends SomeAbstractTest
{
/**
* @dataProvider provideData()
*/
public function test()
{
}
}
```
Imagine a Test class, let's call it A, extending some other (potentially) abstract Test class, B, that has defined example dataProvider methods and class A is using data providers from class B.
This makes DataProviderClassMethodFinder throw exception as the docblock referenced method is not contained in the same class.
The simplest solution would be to change exception throwing into a
continue
step, disadvantage is that the extended class method won't be recognized as a data provider - but this is already happening for the base class that provides the data provider methods only 🙈.Very basic code sample
```php abstract class SomeAbstractTest extends TestCase { public function provideData() { yield [1]; } } final class SomeTest extends SomeAbstractTest { /** * @dataProvider provideData() */ public function test() { } } ```