| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testValidateValue(string $url, bool $valid, array $config = []): void |
||
| 13 | { |
||
| 14 | $validator = new UrlValidator($config); |
||
| 15 | $method = new \ReflectionMethod(UrlValidator::class, 'validateValue'); |
||
| 16 | $method->setAccessible(true); |
||
| 17 | $result = $method->invoke($validator, $url); |
||
| 18 | if ($valid) { |
||
| 19 | $this->assertNull($result); |
||
| 20 | } else { |
||
| 21 | $this->assertTrue(is_array($result)); |
||
| 22 | $this->assertCount(2, $result); |
||
| 23 | } |
||
| 36 |