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 10, 2024
1 parent 0b18ce8 commit c3a4387
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ 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.

<div class="code-snippet">
<img src="/assets/img/datasets-interpolated.webp?1" style="--lines: 2" />
</div>

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 c3a4387

Please sign in to comment.