Example #1
0
 /**
  * @issue ZF-2716
  */
 public function testActionWithPartialsUseOfViewRendererReturnsToOriginatingViewState()
 {
     $partial = new \Zend\View\Helper\Partial();
     $this->view->setScriptPath(__DIR__ . '/_files/modules/application/views/scripts/');
     $partial->setView($this->view);
     HelperBroker::getStaticHelper('viewRenderer')->view = $this->view;
     $partial->direct('partialActionCall.phtml');
     $this->assertSame($this->view, HelperBroker::getStaticHelper('viewRenderer')->view);
 }
Example #2
0
    /**
     * @issue ZF-2716
     */
    public function testActionWithPartialsUseOfViewRendererReturnsToOriginatingViewState()
    {
        $partial = new \Zend\View\Helper\Partial();
        $this->view->resolver()->addPath(__DIR__ . '/_files/modules/application/views/scripts/');
        $partial->setView($this->view);

        $front  = Controller\Front::getInstance();
        $broker = $front->getHelperBroker();
        $broker->load('viewRenderer')->view = $this->view;

        $partial->__invoke('partialActionCall.phtml');

        $this->assertSame($this->view, $broker->load('viewRenderer')->view);

    }