writed tests with multiple datasets

Took 1 hour 6 minutes
This commit is contained in:
Fabio Ivona
2021-05-25 23:56:46 +02:00
parent 296e1c37e8
commit 838ac273ab
4 changed files with 185 additions and 61 deletions

View File

@ -77,11 +77,13 @@ final class TestCall
* Runs the current test multiple times with
* each item of the given `iterable`.
*
* @param \Closure|iterable<int|string, mixed>|string $data
* @param array<\Closure|iterable<int|string, mixed>|string> $data
*/
public function with($data): TestCall
public function with(...$data): TestCall
{
$this->testCaseFactory->datasets[] = $data;
foreach ($data as $dataset) {
$this->testCaseFactory->datasets[] = $dataset;
}
return $this;
}