Only verify prerequisites once for parameterized tests
thekid opened this issue · 1 comments
thekid commented
Using the following test:
use test\verify\Runtime;
use test\{Assert, Test, Values};
class CalculatorTest {
#[Test, Values([[1, 2], [0, 3]]), Runtime(php: '<8.0')]
public function addition($a, $b) {
Assert::equals(3, $a + $b);
}
}
...the addition()
method is invoked twice, and its prerequisites (which are independent of the provider values!) are checked more often than necessary:
This issue suggests changing the behavior to only check prerequisites once for parameterized tests.
thekid commented