/** * Returns an instance of a given route. * * We do not validate the existence of the route here again, as it is supposed to be checked by the calling method. * * @param string $name * @return RouteInterface */ protected function getInstance($name) { $route =& $this->routes[$name]; if (null === $route['instance']) { $route['instance'] = $this->routeManager->build(!isset($route['options']['type']) ? 'Generic' : $route['options']['type'], $route['options']); } return $route['instance']; }
public function testRegisteredServices() { $routeManager = new RouteManager($this->prophesize(ContainerInterface::class)->reveal()); $this->assertTrue($routeManager->has('Generic')); }