コード例 #1
0
 /**
  * @param string $path
  *
  * @return string
  */
 public function getUrl($path)
 {
     if (isset($this->bundleDir)) {
         $path = '/' . $this->bundleDir . '/' . self::THEMES_FOLDER . '/' . ltrim($path, '/');
     }
     return parent::getUrl($path);
 }
コード例 #2
0
 /**
  * @dataProvider getConfigs
  */
 public function testGetUrl($version, $format, $path, $expected)
 {
     $package = new Package($version ? new StaticVersionStrategy($version, $format) : new EmptyVersionStrategy());
     $this->assertEquals($expected, $package->getUrl($path));
 }