/** @covers Brickoo\Component\Routing\Route\RouteCollection::hasPath */ public function testHasRouteCollectionPath() { $routeCollection = new RouteCollection(); $this->assertFalse($routeCollection->hasPath()); $routeCollection = new RouteCollection("articles", "/articles/lists"); $this->assertTrue($routeCollection->hasPath()); }
/** {@inheritDoc} */ public function matchesCollection(RouteCollection $routeCollection) { return !$routeCollection->hasPath() || strpos($this->matchingPath, $routeCollection->getPath()) === 0; }
/** {@inheritDoc} */ public function matchesCollection(RouteCollection $routeCollection) { return !$routeCollection->hasPath() || strpos($this->request->getUri()->getPath(), $routeCollection->getPath()) === 0; }