function IconPackManagerKernelTest::testGetIcon
Test the IconPackManager::getIcon method.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ Icon/ IconPackManagerKernelTest.php, line 109
Class
- IconPackManagerKernelTest
- @coversDefaultClass \Drupal\Core\Theme\Icon\Plugin\IconPackManager
Namespace
Drupal\KernelTests\Core\Theme\IconCode
public function testGetIcon() : void {
$icon = $this->pluginManagerIconPack
->getIcon(self::TEST_ICON_FULL_ID);
$this->assertInstanceOf(IconDefinitionInterface::class, $icon);
$icon = $this->pluginManagerIconPack
->getIcon('test_minimal:_do_not_exist_');
$this->assertNull($icon);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.