Test with dependencies and data provider fails #6104
Labels
feature/data-provider
Data Providers
feature/test-dependencies
Issues related to explicitly declared dependencies between tests
type/bug
Something is broken
Summary
This is a follow-up to #5827 which was closed for a specific case ("mixture of associative and non-associative arrays") but the originally reported issue wasn't answered.
Current behavior
Test cases having both a dependency and a data provider don't work anymore in PHPUnit 11 using the attribute syntax. The same specification worked fine in PHPUnit 10 using the annotation syntax.
How to reproduce
Here's a minimal example with two test functions. The second one depends on the first one and uses a data provider. Running the test yields this error:
Code example:
Expected behavior
I'd expect this to work because the data provider uses an associative array, i.e. the (single) argument IS a named one.
(Note: If I remove the dependency specification, the test runs successfully.)
The text was updated successfully, but these errors were encountered: