Exemple #1
0
 public function testCleanErrors()
 {
     $form = new Form();
     $form->addText('name')->addError('Error');
     $form->addText('container.name')->addError('Errors');
     $this->assertSame(array('Error', 'Errors'), $form->getErrors());
     $form->cleanErrors();
     $this->assertSame(array('Error', 'Errors'), $form->getErrors());
     $form->cleanErrors(TRUE);
     $this->assertSame(array(), $form->getErrors());
 }