This PR is solving the problem that though we can name our datasets, we are not able to take a step further and use those dataset names fluently inside of a test name.
PASS Tests\Feature\TableSortTest
✓ it can sort by all fields with dataset "name"
✓ it can sort by all fields with dataset "email"
✓ it can sort by all fields with dataset "created_at"
PASS Tests\Feature\TableSortTest
✓ it can sort by "name" field
✓ it can sort by "email" field
✓ it can sort by "created_at" field
Questions
I'm not a huge fan of where this functionality is, but I'm not sure where else it could be refactored to. Especially needing to remove the 'dataset ' that is already on the name. However any other approach would require significantly more refactoring I believe.
Is this functionality worth pursuing?
Should I move this somewhere else?
Should I do any other manipulation to the dataset name? Should it have the "..."s on named sets and (...) on unnamed sets?
What:
Description:
This PR is to add the functionality I described in a recent discussion thread.
This PR is solving the problem that though we can name our datasets, we are not able to take a step further and use those dataset names fluently inside of a test name.
To do this you add
:dataset
into your test name, and the dataset name will be interpolated into the test name string. Similar to Laravel's:attribute
inside validation stringsI am very open to any changes!
I targeted
3.x
because this would be a breaking change, even if:dataset
is unlikely.Contrived Example
Before
Test
Pest output
After
Test
Pest output
Questions
I'm not a huge fan of where this functionality is, but I'm not sure where else it could be refactored to. Especially needing to remove the
'dataset '
that is already on the name. However any other approach would require significantly more refactoring I believe."..."
s on named sets and(...)
on unnamed sets?:dataset
?