Пример #1
0
 public function testStringSerializationShouldBeDoctypeAware()
 {
     $view = $this->getView();
     $view->doctype('HTML4_LOOSE');
     $this->helper->setView($view);
     $this->setupDojo();
     $html = $this->helper->__toString();
     $this->assertRegexp('|<style [^>]*>[\\r\\n]+\\s*<!--|', $html);
     $this->assertRegexp('|<script [^>]*>[\\r\\n]+\\s*//<!--|', $html);
     $this->helper = new Zend_Dojo_View_Helper_Dojo();
     $view->doctype('XHTML1_STRICT');
     $this->helper->setView($view);
     $this->setupDojo();
     $html = $this->helper->__toString();
     /**
      * @todo should stylesheets be escaped as CDATA when isXhtml()?
      */
     $this->assertRegexp('|<style [^>]*>[\\r\\n]+\\s*<!--|', $html);
     $this->assertRegexp('|<script [^>]*>[\\r\\n]+\\s*//<!\\[CDATA\\[|', $html);
 }
Пример #2
0
 /**
  * Set view object
  *
  * @param  Zend_Dojo_View_Interface $view
  * @return void
  */
 public function setView(Zend_View_Interface $view)
 {
     $this->view = $view;
     $this->_container->setView($view);
 }