Skip to content

Commit

Permalink
Add explanation of dataset name interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
JHWelch committed Sep 17, 2024
1 parent 0b18ce8 commit a483c61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ If a key is added, Pest will use the key when generating the description for the
<img src="/assets/img/datasets-named.webp?1" style="--lines: 2" />
</div>

If the test name includes `:dataset`, the description will be interpolated into the test name at that location.

```bash
PASS Tests\Feature\ValidationTest
✓ it validates the "first_name" field
✓ it validates the "email" field
```

It is important to notice that when using `closures` in your dataset, you must declare the arguments type in the closure passed to the test function.

```php
Expand Down

0 comments on commit a483c61

Please sign in to comment.