public function testOnBootstrapListenersWithConsoleRequest() { $module = new Module(); $application = $this->createApplication(); $sm = $application->getServiceManager(); $sm->setAllowOverride(true); $sm->setService('Request', new ConsoleRequest()); $em = $application->getEventManager(); $event = new MvcEvent(); $event->setApplication($application); $module->onBootstrap($event); }
public function testOnBootstrapListenersWithConsoleRequest() { $module = new Module(); $application = $this->createApplication(); $sm = $application->getServiceManager(); $sm->setAllowOverride(true); $sm->setService('Request', new ConsoleRequest()); $em = $application->getEventManager(); $event = new \Zend\Mvc\MvcEvent(); $event->setApplication($application); $this->assertCount(0, $em->getListeners(\Zend\Mvc\MvcEvent::EVENT_DISPATCH)); $module->onBootstrap($event); $this->assertCount(0, $em->getListeners(\Zend\Mvc\MvcEvent::EVENT_DISPATCH)); }