ソースを参照

ZF-6741: UnitTest Label Decorator uses element id for attribute id

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21965 44c647ce-9c0f-0410-b52a-842ac1e357ba
alab 15 年 前
コミット
f2b5307700
1 ファイル変更13 行追加4 行削除
  1. 13 4
      tests/Zend/Form/FormTest.php

+ 13 - 4
tests/Zend/Form/FormTest.php

@@ -1112,18 +1112,27 @@ class Zend_Form_FormTest extends PHPUnit_Framework_TestCase
         $this->assertFalse($this->form->isArray());
     }
 
-    /** @issue ZF-6741 */
+    /** 
+     * @group ZF-6741
+     */
     public function testUseIdForDdTagByDefault()
     {
-        $this->form->addElement('text', 'foo')
-                   ->addSubForm(new Zend_Form_SubForm(), 'bar')
+        $this->form->addSubForm(new Zend_Form_SubForm(), 'bar')
                    ->bar->addElement('text', 'foo');
 
         $html = $this->form->setView($this->getView())->render();
-        var_dump($html);
         $this->assertRegexp('/<dd.*?bar-foo.*?>/', $html);
     }
 
+    public function testUseIdForDtTagByDefault()
+    {
+        $this->form->addSubForm(new Zend_Form_SubForm(), 'bar')
+                   ->bar->addElement('text', 'foo');
+
+        $html = $this->form->setView($this->getView())->render();
+        $this->assertRegexp('/<dt.*?bar-foo.*?>/', $html);
+    }
+
     /**
      * @group ZF-3146
      */