Add name to description for named datasets

This commit is contained in:
Stephen Shead
2020-07-19 19:05:54 +10:00
parent be8a64e4b8
commit edcd2cb50e
3 changed files with 24 additions and 5 deletions

13
tests/Unit/Datasets.php Normal file
View File

@ -0,0 +1,13 @@
<?php
use Pest\Datasets;
it('show the names of named datasets in their description', function () {
$descriptions = array_keys(Datasets::resolve('test description', [
'one' => [1],
'two' => [[2]],
]));
$this->assertSame('test description with data set "one" (1)', $descriptions[0]);
$this->assertSame('test description with data set "two" (array(2))', $descriptions[1]);
});