Index: tests/Zend/Form/Decorator/LabelTest.php =================================================================== --- tests/Zend/Form/Decorator/LabelTest.php (revision 24676) +++ tests/Zend/Form/Decorator/LabelTest.php (working copy) @@ -323,6 +323,81 @@ $tagClass = $this->decorator->getTagClass(); $this->assertTrue( NULL === $tagClass, $tagClass ); } + + /** + * @group ZF-9689 + */ + public function testRenderImplicitsOnRequest() + { + $element = new Zend_Form_Element('foo'); + $element->setView($this->getView()) + ->setLabel('My Label'); + + $this->decorator->setElement($element) + ->setOptions( + array( + 'placement' => 'IMPLICIT', + 'separator' => ' ', + ) + ); + + $content = 'test content'; + $actual = $this->decorator->render($content); + + $expected = ''; + + $this->assertEquals($expected, $actual); + } + + /** + * @group ZF-9689 + */ + public function testRenderImplicitPrependsOnRequest() + { + $element = new Zend_Form_Element('foo'); + $element->setView($this->getView()) + ->setLabel('My Label'); + + $this->decorator->setElement($element) + ->setOptions( + array( + 'placement' => 'IMPLICIT_PREPEND', + 'separator' => ' ', + ) + ); + + $content = 'test content'; + $actual = $this->decorator->render($content); + + $expected = ''; + + $this->assertEquals($expected, $actual); + } + + /** + * @group ZF-9689 + */ + public function testRenderImplicitAppendsOnRequest() + { + $element = new Zend_Form_Element('foo'); + $element->setView($this->getView()) + ->setLabel('My Label'); + + $this->decorator->setElement($element) + ->setOptions( + array( + 'placement' => 'IMPLICIT_APPEND', + 'separator' => ' ', + ) + ); + + $content = 'test content'; + $actual = $this->decorator->render($content); + + $expected = ''; + + $this->assertEquals($expected, $actual); + } } // Call Zend_Form_Decorator_LabelTest::main() if this source file is executed directly.