phpunit
phpunit copied to clipboard
New attribute TestWithArray
New attribute TestWithArray introduced.
More compact version of existing TestWith for many cases.
Example:
#[TestWithArray([
'odd' => [1, true],
'even' => [2, false],
])]
public function testNumbers($number, $isOdd): void
{
$this->assertSame($isOdd, $number % 2 === 1);
}