protected function LibraryTypeKernelTestBase::getLibraryType in Libraries API 8.3
Returns the library type that is being tested.
Return value
\Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface The test library type.
2 calls to LibraryTypeKernelTestBase::getLibraryType()
- AssetLibraryTest::testAttachableAssetInfo in tests/
src/ Kernel/ ExternalLibrary/ Asset/ AssetLibraryTest.php - Tests that attachable asset library info is correctly gathered.
- MultipleAssetLibraryTest::testAttachableAssetInfo in tests/
src/ Kernel/ ExternalLibrary/ Asset/ MultipleAssetLibraryTest.php - Tests that attachable asset library info is correctly gathered.
File
- tests/
src/ Kernel/ LibraryTypeKernelTestBase.php, line 122
Class
- LibraryTypeKernelTestBase
- Provides an improved version of the core kernel test base class.
Namespace
Drupal\Tests\libraries\KernelCode
protected function getLibraryType() {
try {
$library_type = $this->libraryTypeFactory
->createInstance($this
->getLibraryTypeId());
} catch (PluginException $exception) {
$library_type = $this
->prophesize(LibraryTypeInterface::class)
->reveal();
} finally {
return $library_type;
}
}