| Total Lines | 12 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function testPredefinedHandler(): void |
||
| 24 | { |
||
| 25 | $handler = new class () implements RuleHandlerInterface { |
||
| 26 | public function validate(mixed $value, object $rule, ValidationContext $context): Result |
||
| 27 | { |
||
| 28 | return new Result(); |
||
| 29 | } |
||
| 30 | }; |
||
| 31 | |||
| 32 | $container = new SimpleRuleHandlerContainer(['test-handler' => $handler]); |
||
| 33 | |||
| 34 | $this->assertSame($handler, $container->resolve('test-handler')); |
||
| 35 | } |
||
| 37 |