/** * @param InputElement|Select|ToggleGroup $element * * @since 2.0 */ public function renderInput($element) { if ($element instanceof Option || $element instanceof Optgroup || $element instanceof Checkbox || $element instanceof Radio) { return $element->render($this); } $name = $element->getName(); $element->setAttribute('id', 'form_' . $name); $this->table->addCell($element->getLabel()); $this->table->addCell($element->render($this)); $this->table->addRow(); return ''; }
/** * @covers ::getAttributes * @covers ::setAttribute * @group Fieldset */ public function testAttributeArray() { $attributes = ['value' => 'pink', 'name' => 'input_area']; $this->object->setAttribute($attributes); $this->assertEquals($attributes, $this->object->getAttributes()); }