Example #1
0
 public function getView()
 {
     $view = new View();
     $libPath = __DIR__ . '/../../../library';
     $view->addHelperPath($libPath . '/Zend/View/Helper');
     return $view;
 }
Example #2
0
 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);
 }
Example #3
0
 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);
 }