コード例 #1
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);

    }