view = $this->getView(); $this->jquery = new ZendX_JQuery_View_Helper_JQuery_Container(); $this->jquery->setView($this->view); Zend_Registry::set('ZendX_JQuery_View_Helper_JQuery', $this->jquery); } public function tearDown() { ZendX_JQuery_View_Helper_JQuery::disableNoConflictMode(); } public function getView() { require_once 'Zend/View.php'; $view = new Zend_View(); $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper'); return $view; } public function testCallingInViewEnablesJQueryHelper() { $element = $this->view->dialogContainer("element", ""); $this->assertTrue($this->jquery->isEnabled()); $this->assertTrue($this->jquery->uiIsEnabled()); } public function testShouldAppendToJqueryHelper() { $element = $this->view->dialogContainer("elem1", "", array("option" => "true")); $jquery = $this->jquery->__toString(); $this->assertContains('dialog(', $jquery); $this->assertContains('"option":"true"', $jquery); } public function testShouldCreateDivContainer() { $element = $this->view->dialogContainer("elem1", "", array(), array()); $this->assertEquals(array('$("#elem1").dialog({});'), $this->jquery->getOnLoadActions()); $this->assertContains("