public function getView() { $view = new View(); $libPath = __DIR__ . '/../../../library'; $view->addHelperPath($libPath . '/Zend/View/Helper'); return $view; }
public function testHelperViewAccessor() { $view = new View(); $view->addHelperPath(__DIR__ . '/_stubs/HelperDir2/'); $view->stub2(); $helpers = $view->getHelpers(); $this->assertEquals(1, count($helpers)); $this->assertTrue(isset($helpers['Stub2'])); $stub2 = $helpers['Stub2']; $this->assertTrue($stub2 instanceof \Zend\View\Helper\Stub2); $this->assertTrue(isset($stub2->view)); $this->assertSame($view, $stub2->view); }
public function testRendersWithPartial() { $view = new View\View(); $view->addBasePath(__DIR__ . '/_files'); $view->addHelperPath(__DIR__ . '/../../../trunk/library/Zend/View/Helper', 'Zend\\View\\Helper'); Helper\PaginationControl::setDefaultViewPartial('partial.phtml'); $this->_paginator->setView($view); $string = $this->_paginator->__toString(); $this->assertEquals('partial rendered successfully', $string); }