function testRender() { $e = new Caption('test', 'Heading'); $exp = '<h3 id="form-test">Heading</h3>'; $this->assertEquals($exp, $e->render()); $e->setTag('span'); $e->setAttributes('hello'); $exp = '<span class="hello" id="form-test">Heading</span>'; $this->assertEquals($exp, $e->render()); }
/** @return Form\Element\Caption */ public function addCaption($field, $label, $info = null) { $c = new Caption($field, $label, $this); if ($info) { $c->setInfo($info); } return $this->fields[$field] = $c; }