/**
  * {@inheritdoc}
  */
 public function process(Chain $chain)
 {
     $callback = function ($path) {
         return $this->notationResolver->convertVariableNotation($path);
     };
     $chain->setContent($this->cssResolver->replaceRelativeUrls($chain->getContent(), $callback));
 }
 /**
  * {@inheritdoc}
  */
 public function process(Chain $chain)
 {
     $asset = $chain->getAsset();
     $callback = function ($path) use($asset) {
         return $this->notationResolver->convertModuleNotationToPath($asset, $path);
     };
     $chain->setContent($this->cssResolver->replaceRelativeUrls($chain->getContent(), $callback));
 }
예제 #3
0
 /**
  * @param string $cssContent
  * @param callback $inlineCallback
  * @param string $expectedResult
  * @dataProvider replaceRelativeUrlsDataProvider
  */
 public function testReplaceRelativeUrls($cssContent, $inlineCallback, $expectedResult)
 {
     $actual = $this->object->replaceRelativeUrls($cssContent, $inlineCallback);
     $this->assertEquals($expectedResult, $actual);
 }