Exemplo n.º 1
0
 public function testIsValidWithCleanFieldHook()
 {
     require_once __DIR__ . '/../files/forms/test_form_2.php';
     $form = new \TestForm2();
     $this->assertFalse($form->isValid(array('lib' => 'bar')));
     $this->assertEquals('Lib should be "foo"', $form->errors['lib']);
     $form = new \TestForm2();
     $this->assertTrue($form->isValid(array('lib' => 'foo')));
 }