-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
depending on how a dataprovider is keyed, the --filter parameter needs to be provided in a different format:
namely @ vs. # formatted
for a dataprovider with named keys:
function provideData(): iterable {
yield['my name' => 1];
}--filter "testSuiteSorterDefectsWithDataProviderTest@my name"
the corresponding test error is
2) PHPUnit\TestFixture\FaillingDataProviderTest::testWithProvider with data set "my name" (1)
=> I think it would be useful if the error message would contain @my name instead of just my name, to ease building the filter param
for a dataprovider with indexed keys:
function provideData(): iterable {
yield[1];
}--filter "testSuiteSorterDefectsWithDataProviderTest#1"
the corresponding test error is
PHPUnit\TestFixture\FaillingDataProviderTest::testWithProvider with data set #1 (1)
=> here its easy to remember we can run the test with #1 because the error message tells me so