Browse Source

reverted r24477 from trunk; undo ZF-11747 (missed use case caused BC break)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24488 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan 14 years ago
parent
commit
17951da3da
2 changed files with 2 additions and 15 deletions
  1. 2 3
      library/Zend/View/Helper/Form.php
  2. 0 12
      tests/Zend/View/Helper/FormTest.php

+ 2 - 3
library/Zend/View/Helper/Form.php

@@ -73,11 +73,10 @@ class Zend_View_Helper_Form extends Zend_View_Helper_FormElement
                . '>';
 
         if (false !== $content) {
-            $xhtml .= $content;
+            $xhtml .= $content
+                   .  '</form>';
         }
 
-        $xhtml .= '</form>';
-
         return $xhtml;
     }
 }

+ 0 - 12
tests/Zend/View/Helper/FormTest.php

@@ -167,18 +167,6 @@ class Zend_View_Helper_FormTest extends PHPUnit_Framework_TestCase
         $form = $this->helper->form('FormName', array('action' => '/foo', 'method' => 'get'));
         $this->assertNotRegexp('/<form[^>]*(name="FormName")/', $form);
     }    
-
-    /**
-     * @group ZF-11747
-     */
-    public function testClosingTagIsPrintedWhenContentIsOmitted()
-    {
-        $form = $this->helper->form('FormName');
-        // Check that opening tag was printed
-        $this->assertContains('<form', $form);
-        // Check that closing tag was printed
-        $this->assertContains('</form>', $form);
-    }    
 }
 
 // Call Zend_View_Helper_FormTest::main() if this source file is executed directly.