-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Overridden DataProvider function not being called in Codeception v5.1.2 #6756
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
Comments
After digging around in the DataProvider implementation and recent Codeception changes. Specifically this line was my problem: I managed to fix the problem by changing my parent class to abstract like this: Parent:
Child:
Now the correct child data provider function is being called as expected. So I'm not sure if this really counts as an issue anymore, but just as a note the previous code did work in Codeception 4 and only stopped working once we upgraded to 5. |
Earlier versions of Codeception relied on dataprovider implementation of PHPUnit, so there is a big difference. |
What are you trying to achieve?
I am trying to override a DataProvider function like this. This code worked in Codeception ^4.1 but the same code no longer works in Codeception ^5.1.
Parent:
Child:
When I run
codecept run Acceptance Cron244Cest
I am expecting the dataProvider to provide2.4.4
since the dataProvider is overridden inCron244Cest
.What do you get instead?
But instead I get
1.0.0
from the parent dataProvider. When debugging, I land in the parent function and the overridden function is never called.Details
composer show
):The text was updated successfully, but these errors were encountered: