| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class WhenNullTest extends TestCase |
||
| 14 | { |
||
| 15 | public function dataBase(): array |
||
| 16 | { |
||
| 17 | return [ |
||
| 18 | [ |
||
| 19 | [], |
||
| 20 | null, |
||
| 21 | new Number(skipOnEmpty: new WhenNull()), |
||
| 22 | ], |
||
| 23 | [ |
||
| 24 | [], |
||
| 25 | [], |
||
| 26 | ['property' => new Number(skipOnEmpty: new WhenNull())], |
||
| 27 | ], |
||
| 28 | [ |
||
| 29 | ['Value must be a number.'], |
||
| 30 | '', |
||
| 31 | new Number(skipOnEmpty: new WhenNull()), |
||
| 32 | ], |
||
| 33 | ]; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @dataProvider dataBase |
||
| 38 | */ |
||
| 39 | public function testBase(array $expectedMessages, mixed $data, array|RuleInterface|null $rules = null): void |
||
| 44 | } |
||
| 45 | } |
||
| 46 |