| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 4 | public function testValidateTrueFalse() |
||
| 5 | { |
||
| 6 | $test = true; |
||
| 7 | $validator = new \Suricate\Validator($test); |
||
| 8 | |||
| 9 | $validator->true("Not true"); |
||
|
|
|||
| 10 | $this->assertSame(0, count($validator->getErrors())); |
||
| 11 | $this->assertTrue($validator->pass()); |
||
| 12 | $this->assertFalse($validator->fails()); |
||
| 13 | |||
| 14 | $validator->false("Not false"); |
||
| 15 | $this->assertSame(1, count($validator->getErrors())); |
||
| 16 | $this->assertFalse($validator->pass()); |
||
| 17 | $this->assertTrue($validator->fails()); |
||
| 18 | $this->assertSame("Not false", $validator->getErrors()[0]); |
||
| 19 | |||
| 21 | } |