/** * {@inheritdoc} */ public function getUrl($path) { if ($this->isAbsoluteUrl($path)) { return $path; } $path = $this->removePrefix($path); return parent::getUrl($path); }
/** * @dataProvider getContextConfigs */ public function testGetUrlWithContext($basePathRequest, $basePath, $format, $path, $expected) { $package = new PathPackage($basePath, new StaticVersionStrategy('v1', $format), $this->getContext($basePathRequest)); $this->assertEquals($expected, $package->getUrl($path)); }