| Conditions | 2 | 
| Paths | 1 | 
| Total Lines | 10 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 23 | 	public function testValidate( $value, $hasToExist, $expectedError ) { | ||
| 24 | $validator = new TitleValidator(); | ||
| 25 | $validator->setOptions( [ 'hastoexist' => $hasToExist ] ); | ||
| 26 | $result = $validator->validate( $value ); | ||
| 27 | |||
| 28 | $this->assertEquals( | ||
| 29 | $expectedError === null ? [] : [ $expectedError ], | ||
| 30 | $result->getErrors() | ||
| 31 | ); | ||
| 32 | } | ||
| 33 | |||
| 63 |