$this->libraryDiscovery =
new LibraryDiscovery($this->libraryDiscoveryCollector
);
$this->libraryDiscoveryCollector->
expects($this->
once()) ->
method('get'
) ->
with('test'
) ->
willReturn($this->libraryData
);
} /**
* @covers ::getLibrariesByExtension
*/
public function testGetLibrariesByExtension() { $this->libraryDiscovery->
getLibrariesByExtension('test'
);
// Verify that subsequent calls don't trigger hook_library_info_alter()
// and hook_js_settings_alter() invocations, nor do they talk to the
// collector again. This ensures that the alterations made by
// hook_library_info_alter() and hook_js_settings_alter() implementations
// are statically cached, as desired.
$this->libraryDiscovery->
getLibraryByName('test', 'test_1'
);
$this->libraryDiscovery->
getLibrariesByExtension('test'
);
} /**
* Tests getting a library by name.
*
* @covers ::getLibraryByName
*/