public function testIgnoreExistingFQDN() { $input = 'background: url(http://www.example.com/path/to/image.jpg) no-repeat centre centre;'; $expected = 'background: url(' . $this->target . 'path/to/image.jpg) no-repeat centre centre;'; $writer = new Rewriter($input, $this->target); $output = $writer->rewrite(); $this->assertSame($expected, $output); }
public function filterDump(AssetInterface $asset) { $writer = new Rewriter($asset->getContent(), $this->target); $content = $writer->rewrite(); $asset->setContent($content); }