validateStringMaxLength() public method

public validateStringMaxLength ( $value, $maxLength, $errorMessage, $errorField = null )
Beispiel #1
0
 /**
  * @test
  */
 public function shouldNotBeValidStringMaxLength()
 {
     //given
     $validatable = new Validatable();
     //when
     $validatable->validateStringMaxLength('string is too long', 3, 'Too long string');
     //then
     $errors = $validatable->getErrors();
     $this->assertEquals('Too long string', $errors[0]);
 }