publicPathWithoutDigest: '/assets/styles/bar.css.map',
publicPath: '/assets/styles/bar.abcd123.css.map',
),
'sourcemaps/baz.css.map' =>
new MappedAsset($path,
publicPathWithoutDigest: '/assets/sourcemaps/baz.css.map',
publicPath: '/assets/sourcemaps/baz.987fedc.css.map',
),
default => null,
};
});
$compiler =
new SourceMappingUrlsCompiler();
$asset =
new MappedAsset($sourceLogicalName,
publicPathWithoutDigest: '/assets/'.
$sourceLogicalName,
);
$this->
assertSame($expectedOutput,
$compiler->
compile($input,
$asset,
$assetMapper));
$assetDependencyLogicalPaths =
array_map(fn (AssetDependency
$dependency) =>
$dependency->asset->logicalPath,
$asset->
getDependencies());
$this->
assertSame($expectedDependencies,
$assetDependencyLogicalPaths);
if ($expectedDependencies) { $this->
assertTrue($asset->
getDependencies()[0
]->isContentDependency
);
} }