/ phpunit Public
All-day breakfast at the dataprovider buffet #3401
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
Thanks to @reinholdfuereder some remaining issues with the reordering of
@dataprovider-fed tests have been resolved. As described in more detail #3396 and its predecessor ticket #3246, the main problem with execution reordering has been understanding the hierarchy of the run queue.
Lack of a consistent naming scheme for each individual combination of (test, data) reared its ugly head again. This has now been solved cleanly and I've updated all the tests to match the new scheme, so all previous functionality remains under guard. I have added a regression end-to-end test to keep an eye on the dataproviders.
TestSuite, in addition to the (already existing) functionality to sort failing dataprovider rows to the front of their parent test
NameSpace\TestClass::testMethod with data set $dataor a PHPT filename
TestSuiteSorternow uses normalized FQCN+dataname everywhere
ResultCacheListenerkeeps the FQCN+dataname of tests but strips the dump of the data
I have opted to not add refinements to the
TestResultCacheat this time, to keep the changes atomic. If I learned anything from #3246 is that debugging the sorters is still very time consuming. Such optimizations add complexity and would only be noticeable by maintainers of large projects and even then it's more of a nice-to-have.
As always let me know if you have any remarks or wishes.