Index: tests/Zend/Form/Element/ButtonTest.php =================================================================== --- tests/Zend/Form/Element/ButtonTest.php (revision 25167) +++ tests/Zend/Form/Element/ButtonTest.php (working copy) @@ -41,6 +41,11 @@ class Zend_Form_Element_ButtonTest extends PHPUnit_Framework_TestCase { /** + * @var Zend_Form_Element_Button + */ + protected $element; + + /** * Runs the test methods of this class. * * @return void @@ -151,6 +156,41 @@ } /** + * @group ZF-5056 + */ + public function testValidateAlwaysReturnsTrue() + { + $this->element->setValue('foo'); + + $this->assertTrue($this->element->isValid('bar')); + } + + /** + * @group ZF-5056 + */ + public function testRenderingWithValueAfterValidation() + { + // Set element options + $this->element->setOptions( + array( + 'label' => 'Foo', + 'value' => 'bar', + 'decorators' => array( + 'ViewHelper', + ), + ) + ); + + // Validate + $this->element->isValid(null); + + $this->assertEquals( + PHP_EOL . '', + $this->element->render($this->getView()) + ); + } + + /** * Used by test methods susceptible to ZF-2794, marks a test as incomplete * * @link http://framework.zend.com/issues/browse/ZF-2794