public function testGetRoutesByNames() { $this->buildRoutes(); $routeNames = array(self::ROUTE_ROOT . '/testroute/noroute/child', self::ROUTE_ROOT . '/testroute/noroute', self::ROUTE_ROOT . '/testroute/', self::ROUTE_ROOT . '/testroute'); $routes = $this->repository->getRoutesByNames($routeNames); $this->assertCount(2, $routes); $this->assertContainsOnlyInstancesOf('Symfony\\Cmf\\Component\\Routing\\RouteObjectInterface', $routes); }
public function testDumpRoutesDisabled() { $this->dmMock->expects($this->never())->method('createPhpcrQuery'); $this->dmMock->expects($this->never())->method('getDocumentsByPhpcrQuery'); $routeProvider = new RouteProvider($this->managerRegistryMock, $this->candidatesMock); $routeProvider->setManagerName('default'); $routeProvider->setRouteCollectionLimit(0); $this->assertEquals(array(), $routeProvider->getRoutesByNames()); }