Esempio n. 1
0
 /**
  * test renderValidationErrors()
  */
 public function testRenderValidationErrors()
 {
     $input = new TextInput('foo', 'value');
     $input->setValue(array('one', 'two'));
     // setValue doesn't accept array
     $input->addClass('$@#$%^&');
     // no special chars allowed in class name
     $errors = $input->renderValidationErrors('my custom message');
     $this->assertContains('div class="error"', $errors);
     $this->assertContains('my custom message', $errors);
     $input = new TextInput('foo', 'value');
     $errors = $input->renderValidationErrors();
     $this->assertEmpty($errors);
 }