| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testValidate(): void |
||
| 14 | { |
||
| 15 | $value = 18449; |
||
| 16 | // default config |
||
| 17 | $val = new CompareTo($value); |
||
| 18 | |||
| 19 | $this->assertTrue($val->validate($value)->isValid()); |
||
| 20 | $this->assertTrue($val->validate((string)$value)->isValid()); |
||
| 21 | $this->assertFalse($val->validate($value + 1)->isValid()); |
||
| 22 | foreach ($this->getOperationTestData($value) as $operator => $tests) { |
||
| 23 | $val = new CompareTo($value); |
||
| 24 | $val->operator($operator); |
||
| 25 | foreach ($tests as $test) { |
||
| 26 | $this->assertEquals($test[1], $val->validate($test[0])->isValid(), "Testing $operator"); |
||
| 27 | } |
||
| 76 |