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(); Zend_Dojo::enableView($view); return $view; } public function getElement() { $element = new Zend_Dojo_Form_Element_SimpleTextarea( 'foo', array( 'value' => 'some text', 'label' => 'SimpleTextarea', 'class' => 'someclass', 'style' => 'width: 100px;', ) ); return $element; } public function testShouldRenderSimpleTextareaDijit() { $html = $this->element->render(); $this->assertContains('dojoType="dijit.form.SimpleTextarea"', $html); } } // Call Zend_Dojo_Form_Element_SimpleTextareaTest::main() if this source file is executed directly. if (PHPUnit_MAIN_METHOD == "Zend_Dojo_Form_Element_SimpleTextareaTest::main") { Zend_Dojo_Form_Element_SimpleTextareaTest::main(); }