Fix FormTest breaking after onchange modification

refs #4622
This commit is contained in:
Jannis Moßhammer 2013-08-29 14:16:26 +02:00 committed by Marius Hein
parent a8b3716662
commit 4d9ecd2b3b

View File

@ -60,7 +60,7 @@ class FormTest extends Zend_Test_PHPUnit_ControllerTestCase
$form = new TestForm();
$form->addElement('checkbox', 'example1', array());
$form->enableAutoSubmit(array('example1'));
$this->assertArrayHasKey('onchange', $form->getElement('example1')->getAttribs(),
$this->assertArrayHasKey('data-icinga-form-autosubmit', $form->getElement('example1')->getAttribs(),
'Asserting that auto-submit got enabled for one element');
}
@ -73,9 +73,9 @@ class FormTest extends Zend_Test_PHPUnit_ControllerTestCase
$form->addElement('checkbox', 'example1', array());
$form->addElement('checkbox', 'example2', array());
$form->enableAutoSubmit(array('example1', 'example2'));
$this->assertArrayHasKey('onchange', $form->getElement('example1')->getAttribs(),
$this->assertArrayHasKey('data-icinga-form-autosubmit', $form->getElement('example1')->getAttribs(),
'Asserting that auto-submit got enabled for multiple elements');
$this->assertArrayHasKey('onchange', $form->getElement('example2')->getAttribs(),
$this->assertArrayHasKey('data-icinga-form-autosubmit', $form->getElement('example2')->getAttribs(),
'Asserting that auto-submit got enabled for multiple elements');
}