assertIsArray($module->getConfig()); } public function testCanRegisterGuards() { $module = new Module(); $mvcEvent = $this->createMock('Laminas\Mvc\MvcEvent'); $application = $this->createMock('Laminas\Mvc\Application'); $eventManager = $this->createMock('Laminas\EventManager\EventManagerInterface'); $serviceManager = $this->createMock('Laminas\ServiceManager\ServiceManager'); $mvcEvent->expects($this->once())->method('getTarget')->will($this->returnValue($application)); $application->expects($this->once())->method('getEventManager')->will($this->returnValue($eventManager)); $application->expects($this->once())->method('getServiceManager')->will($this->returnValue($serviceManager)); $guards = [ $this->createMock('LmcRbacMvc\Guard\GuardInterface') ]; $serviceManager->expects($this->once()) ->method('get') ->with('LmcRbacMvc\Guards') ->will($this->returnValue($guards)); $module->onBootstrap($mvcEvent); } }