示例#1
0
 public function testHasContainer()
 {
     $oldContainer = $this->_helper->getContainer();
     $this->_helper->setContainer(null);
     $this->assertFalse($this->_helper->hasContainer());
     $this->_helper->setContainer($oldContainer);
 }
示例#2
0
 public function testServiceManagerIsUsedToRetrieveContainer()
 {
     $container = new Container();
     $serviceManager = new ServiceManager();
     $serviceManager->setService('navigation', $container);
     $pluginManager = new View\HelperPluginManager();
     $pluginManager->setServiceLocator($serviceManager);
     $this->_helper->setServiceLocator($pluginManager);
     $this->_helper->setContainer('navigation');
     $expected = $this->_helper->getContainer();
     $actual = $container;
     $this->assertEquals($expected, $actual);
 }