Example #1
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);
 }