isValid() public method

public isValid ( $value, array $parameters )
$parameters array
 public function testValidate()
 {
     $validator = new ReferenceValidator();
     $parameters = [$this->dataBook, 'library'];
     $read = $validator->isValid(1, $parameters);
     $this->assertTrue($read);
     $read = $validator->isValid(2, $parameters);
     $this->assertFalse($read);
     $read = $validator->isValid(null, $parameters);
     $this->assertTrue($read);
     $read = $validator->isValid('', $parameters);
     $this->assertTrue($read);
 }