/** @return Form\Element\Hidden */ public function addHidden($field, $label = null, $value = null) { $h = new Hidden($field, $label, $this); if ($value) { $h->setDefaultValue($value); } return $this->fields[$field] = $h; }
function testRender() { $e = new Hidden('test'); $exp = '<input id="form-test" name="test" type="hidden" value="" />'; $this->assertEquals($exp, $e->render(), 'Рендер по-умолчанию'); }