public function testOnDispatchWithoutIdentityAndLoginPage() { $this->object->getEvent()->setRouteMatch(new RouteMatch(array('controller' => 'controller'))); $this->object->dispatch(Registry::get('Application')->getRequest(), null); $routeMatch = new RouteMatch(array()); $routeMatch->setMatchedRouteName('content'); $this->object->getEvent()->setRouteMatch($routeMatch); $this->assertInstanceOf('Zend\\Http\\PhpEnvironment\\Response', $this->object->dispatch(Registry::get('Application')->getRequest(), null)); }