],
],
],
],
];
vfsStream::
setup('root', NULL,
$structure);
$extension_list =
$this->
prophesize(ProfileExtensionList::
class);
$extension_list->
getPath('library_testing'
)->
willReturn('profiles/library_testing'
);
$finder =
new LibrariesDirectoryFileFinder('vfs://root', 'sites/example.com',
$extension_list->
reveal(), 'library_testing'
);
// The site specific location is the first location used.
$path =
$finder->
find('third_party_library/css/example.css'
);
$this->
assertEquals('sites/example.com/libraries/third_party_library/css/example.css',
$path);
// After removing the site specific location the root libraries folder
// should be used.
unlink('vfs://root/sites/example.com/libraries/third_party_library/css/example.css'
);
$path =
$finder->
find('third_party_library/css/example.css'
);
$this->
assertEquals('libraries/third_party_library/css/example.css',
$path);