phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Enable named data sets with the #[TestWith*] attributes

Open HypeMC opened this issue 3 years ago • 2 comments

Adds an optional data set name argument to the #[TestWith] & #[TestWithJson] attributes:

#[TestWith(['a', 'b'], 'Name1')]
#[TestWith(['c', 'd'], 'Name2')]
public function testFoo(string $one, string $two)
{}

HypeMC avatar Apr 26 '22 20:04 HypeMC

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (48dd8a7) 89.40% compared to head (1779737) 89.41%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4964      +/-   ##
============================================
+ Coverage     89.40%   89.41%   +0.01%     
- Complexity     6425     6430       +5     
============================================
  Files           683      683              
  Lines         20405    20427      +22     
============================================
+ Hits          18243    18265      +22     
  Misses         2162     2162              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 02 '22 09:05 codecov[bot]

@sebastianbergmann Hi, any thoughts on this one? Judging by the few likes I got, there seems to be at least some interest in this feature. If there's anything else I can do here, please let me know.

HypeMC avatar Jan 04 '23 23:01 HypeMC

Merged manually, thanks!

sebastianbergmann avatar Jan 13 '24 14:01 sebastianbergmann