-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Milestone
Description
Summary
Inline data for parameterized tests without separate provider method.
Feature
#[DataSet([1, 'a'])]
#[DataSet([2, 'b'])]
#[DataSet([3, 'c'])]
public function testMethod(int $number, string $letter) {}| Dataset | $number | $letter |
|---|---|---|
| 0 | 1 | a |
| 1 | 2 | b |
| 2 | 3 | c |
Named datasets
#[DataSet('first', [1, 'a'])]
#[DataSet('second', [2, 'b'])]
public function testMethod(int $number, string $letter) {}Datasets: first, second
Combined with DataProvider
#[DataProvider('commonCases')]
#[DataSet('edge', [0, ''])]
public function testMethod(int $number, string $letter) {}Notes
- Empty args
#[DataSet([])]→ Dataset without arguments (default values will be used)
Future Scope
- Support in
#[DataZip]and#[DataCross]combinators
Metadata
Metadata
Assignees
Labels
No labels