- Issue created by @jonathan1055
- 🇬🇧United Kingdom jonathan1055
There are also 19 reported errors where the specific data provider does not have a "related" test method. For example, in SchedulerJavascriptDefaultTimeTest.php the test function is called testTimeWhenSchedulingIsRequired() and the data provider is dataTimeWhenSchedulingIsRequired() which used to be the recognised way to name them. But we still get the message
------ ----------------------------------------------------------------------- Line tests/src/FunctionalJavascript/SchedulerJavascriptDefaultTimeTest.php ------ ----------------------------------------------------------------------- 54 @dataProvider dataTimeWhenSchedulingIsRequired() related method not found. 🪪 phpunit.dataProviderMethod ------ -----------------------------------------------------------------------
So there is some new "standard" for naming data providers.
- 🇬🇧United Kingdom jonathan1055
There is no particular agreed standard for dataprovider names, although the discussion is happening on 📌 Define a standard for naming data providers in PHPUnit-based tests Active
The PHPStan warning is checking that the test function contains the expected tag
@dataProvider whateverYouCalledIt
but without the()
after the name. So that is all that needs to be changed here. -
jonathan1055 →
committed 78767905 on 2.x
Issue #3500821: Fix PHPStan for @dataProvider related method not found
-
jonathan1055 →
committed 78767905 on 2.x
Automatically closed - issue fixed for 2 weeks with no activity.