function ExtractorTest::testCreateIconExceptionTemplate

Test the IconExtractorBase:createIcon method with Exception.

File

core/tests/Drupal/Tests/Core/Theme/Icon/Plugin/ExtractorTest.php, line 138

Class

ExtractorTest
Tests icon extractor with base and finder base plugin.

Namespace

Drupal\Tests\Core\Theme\Icon\Plugin

Code

public function testCreateIconExceptionTemplate() : void {
    $extractorPlugin = new TestExtractor([], $this->pluginId, []);
    $this->expectException(IconPackConfigErrorException::class);
    $this->expectExceptionMessage('Missing `template` in your definition, extractor test_extractor requires this value.');
    $extractorPlugin->createIcon('foo');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.