view = $this->getView(); $this->element = $this->getElement(); $this->element->setView($this->view); } /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. * * @return void */ public function tearDown() { } public function getView() { require_once 'Zend/View.php'; $view = new Zend_View(); $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper'); return $view; } public function getElement() { $element = new Zend_Dojo_Form_Element_Textarea( 'foo', array( 'value' => 'some text', 'label' => 'Textarea', 'class' => 'someclass', 'style' => 'width: 100px;', ) ); return $element; } public function testShouldRenderTextareaDijit() { $html = $this->element->render(); $this->assertContains('dojoType="dijit.form.Textarea"', $html); } } // Call Zend_Dojo_Form_Element_TextareaTest::main() if this source file is executed directly. if (PHPUnit_MAIN_METHOD == "Zend_Dojo_Form_Element_TextareaTest::main") { Zend_Dojo_Form_Element_TextareaTest::main(); }