validate() public method

public validate ( $input )
Example #1
0
 /**
  * @depends testConstructorWithValidatorName
  * @depends testZendDateValidatorWithRespectMethods
  * @expectedException Respect\Validation\Exceptions\ZendException
  */
 public function testRespectExceptionForFailedValidation()
 {
     $v = new Zend('Date');
     $notValid = 'a';
     $this->assertFalse($v->validate($notValid), 'The validator returned true for an invalid value, this won\'t cause an exception later on.');
     $this->assertFalse($v->assert($notValid));
 }