$dependentOnContentAsset->
addDependency(new AssetDependency($deeplyNestedAsset, isContentDependency: true
));
$mappedAsset->
addDependency(new AssetDependency($dependentOnContentAsset, isContentDependency: true
));
$notDependentOnContentAsset =
new MappedAsset( 'already-abcdefVWXYZ0123456789.digested.css',
__DIR__.'/../fixtures/dir2/already-abcdefVWXYZ0123456789.digested.css',
);
$mappedAsset->
addDependency(new AssetDependency($notDependentOnContentAsset, isContentDependency: false
));
// just adding any file as an example
$mappedAsset->
addFileDependency(__DIR__.'/../fixtures/importmap.php'
);
$mappedAsset->
addFileDependency(__DIR__.'/../fixtures/dir3'
);
$factory =
$this->
createMock(MappedAssetFactoryInterface::
class);
$factory->
expects($this->
once()) ->
method('createMappedAsset'
) ->
willReturn($mappedAsset);
$cachedFactory =
new CachedMappedAssetFactory( $factory,
$this->cacheDir,
true
);