public function LibraryTypeKernelTestBase::testLibraryType in Libraries API 8.3
Tests that the library type can be instantiated.
File
- tests/
src/ Kernel/ LibraryTypeKernelTestBase.php, line 84
Class
- LibraryTypeKernelTestBase
- Provides an improved version of the core kernel test base class.
Namespace
Drupal\Tests\libraries\KernelCode
public function testLibraryType() {
$type_id = $this
->getLibraryTypeId();
try {
$this->libraryTypeFactory
->createInstance($type_id);
$this
->assertTrue(TRUE, "Library type '{$type_id}' can be instantiated.");
} catch (PluginException $exception) {
$this
->fail("Library type '{$type_id}' cannot be instantiated.");
}
}