$this->
assertInstanceOf(FileResource::
class,
$configCacheMetadata[0
]);
$this->
assertInstanceOf(DirectoryResource::
class,
$configCacheMetadata[1
]);
$this->
assertInstanceOf(FileResource::
class,
$configCacheMetadata[2
]);
$this->
assertSame(realpath(__DIR__.'/../fixtures/importmap.php'
),
$configCacheMetadata[0
]->
getResource());
$this->
assertSame($mappedAsset->sourcePath,
$configCacheMetadata[2
]->
getResource());
$this->
assertSame($dependentOnContentAsset->sourcePath,
$configCacheMetadata[3
]->
getResource());
$this->
assertSame($deeplyNestedAsset->sourcePath,
$configCacheMetadata[4
]->
getResource());
} private function loadConfigCacheMetadataFor(MappedAsset
$mappedAsset): array
{ $cachedPath =
$this->
getConfigCachePath($mappedAsset).'.meta';
return unserialize(file_get_contents($cachedPath));
} private function saveConfigCache(MappedAsset
$mappedAsset): void
{ $configCache =
new ConfigCache($this->
getConfigCachePath($mappedAsset), true
);
$configCache->
write(serialize($mappedAsset),
[new FileResource($mappedAsset->sourcePath
)]);
} private function getConfigCachePath(MappedAsset
$mappedAsset): string
{