New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"PHPUnit_Framework_TestSuite_DataProvider" does not extend PHPUnit_Framework_TestCase #2859
"PHPUnit_Framework_TestSuite_DataProvider" does not extend PHPUnit_Framework_TestCase #2859
Comments
CC @kubawerlos |
Thank you for your report. Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting. Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue. |
Interestingly it only seems to occur when I include
To be honest, as providing the first directory recurses through child directories, removing the second directory definiton should not be a problem. |
When running coverage reports this issue occurs on our builds as well.
|
I'm seeing this fatal error too, and I've narrowed down the reproducible steps to the following.
class Test_One extends PHPUnit_Framework_TestCase {
/**
* @dataProvider dataOne
*/
public function testOne( $data ) {
}
public function dataOne() {
return array(
);
}
} class Test_Two extends PHPUnit_Framework_TestCase {
/**
* @dataProvider dataTwo
*/
public function testTwo( $data ) {
}
public function dataTwo() {
return array(
);
}
} |
@kubawerlos I have reverted #2834 for PHPUnit 5.7 now. Will revert for PHPUnit 6.4 and PHPUnit 6.5 soon. |
Have just noticed this exception being thrown when trying to run a test suite with a
dataProvider
included.Looking at the diff between this version and the previous it seems to be due to the caching of the declared classes. Setting the
declaredClasses
before attempting to load the file (similar to how it worked before) seems to solve the issue.The text was updated successfully, but these errors were encountered: