isValid() 공개 메소드

public isValid ( $value, array $parameters )
$parameters array
예제 #1
0
 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);
 }