public function testJsonExpressionRenders() { $this->helper->addDijit('foo', array('dojoType' => 'dijit.form.TextBox', 'onChange' => new Zend_Json_Expr('function(){alert(\'foo\');}'))); $output = $this->helper->dijitsToJson(); $this->assertRegexp('#(function\\(\\){alert\\(\'foo\'\\);})#', $output); }