/** * {@inheritDoc} */ public function getRoute($routeId) { $query = $this->prepareRouteQuery($routeId); $parser = $this->getProvider()->getRouteParser($query); $route = new Route($parser->getRouteId(), $parser->getRouteName()); foreach ($parser->getStations() as $station) { $route->addStation($station); } return $route; }
/** * @dataProvider getIdProvider */ public function testGetId($id) { $route = new Route($id, "San Sebastián"); $this->assertEquals($id, $route->getId()); }