public function FormBuilderFormBaseTest::testElementIdIndexing in Form Builder 7
@covers FormBuilderFormBase::__construct @covers FormBuilderFormBase::indexElements
File
- tests/
FormBuilderFormBaseTest.php, line 98
Class
Code
public function testElementIdIndexing() {
$form['a']['#type'] = 'textfield';
$form['a']['#form_builder'] = array(
'element_id' => 'A',
);
$form['a']['b'] = array(
'#type' => 'textfield',
);
$form['a']['b']['#form_builder'] = array(
'element_id' => 'B',
);
$form_obj = new FormBuilderFormBase('webform', 'test', NULL, array(), $form);
$this
->assertNotEmpty($form_obj
->getElementArray('A'));
$this
->assertNotEmpty($form_obj
->getElementArray('B'));
}