| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testDifferentRuleInHandler(): void |
||
| 14 | { |
||
| 15 | [$ruleClassName, $ruleHandlerClassName] = $this->getDifferentRuleInHandlerItems(); |
||
| 16 | |||
| 17 | $rule = new RuleWithCustomHandler($ruleHandlerClassName); |
||
| 18 | $validator = ValidatorFactory::make(); |
||
| 19 | |||
| 20 | $this->expectException(UnexpectedRuleException::class); |
||
|
|
|||
| 21 | $this->expectExceptionMessage( |
||
| 22 | 'Expected "' . $ruleClassName . '", but ' . RuleWithCustomHandler::class . ' given.' |
||
| 23 | ); |
||
| 24 | $validator->validate([], [$rule]); |
||
| 25 | } |
||
| 32 |