view = new Zend_View(); $this->helper = new Zend_View_Helper_Fieldset(); $this->helper->setView($this->view); ob_start(); } /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. * * @return void */ public function tearDown() { ob_end_clean(); } public function testFieldsetHelperCreatesFieldsetWithProvidedContent() { $html = $this->helper->fieldset('foo', 'foobar'); $this->assertRegexp('#
', $html); $this->assertContains('foobar', $html); } public function testProvidingLegendOptionToFieldsetCreatesLegendTag() { $html = $this->helper->fieldset('foo', 'foobar', array('legend' => 'Great Scott!')); $this->assertRegexp('##', $html); } /** * @see ZF-2913 */ public function testEmptyLegendShouldNotRenderLegendTag() { foreach (array(null, '', ' ', false) as $legend) { $html = $this->helper->fieldset('foo', 'foobar', array('legend' => $legend)); $this->assertNotContains('