/** * Checks if the route collection is responsible for the requested route and collection. * @param string $routeName * @param string $collectionName * @param \Brickoo\Component\Routing\Route\RouteCollection $routeCollection * @return boolean */ private function isCollectionResponsible($routeName, $collectionName, RouteCollection $routeCollection) { return (empty($collectionName) || $routeCollection->getName() == $collectionName) && $routeCollection->hasRoute($routeName); }
/** * @covers Brickoo\Component\Routing\Route\RouteCollection::hasRoute * @expectedException \InvalidArgumentException */ public function testHasRouteThrowsInvalidArgumentException() { $routeCollection = new RouteCollection("name", "/path"); $routeCollection->hasRoute(array("wrongType")); }