function ExtractorTest::testDiscoverIconsExceptionSource

Test the IconExtractorWithFinder:checkRequiredConfigSources method.

File

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

Class

ExtractorTest
Tests icon extractor with base and finder base plugin.

Namespace

Drupal\Tests\Core\Theme\Icon\Plugin

Code

public function testDiscoverIconsExceptionSource() : void {
    $extractorPlugin = new TestExtractorWithFinder([], $this->pluginId, [], $this->createMock(IconFinder::class));
    $this->expectException(IconPackConfigErrorException::class);
    $this->expectExceptionMessage('Missing or invalid `config: sources` in your definition, extractor test_extractor requires this value as array.');
    $extractorPlugin->discoverIcons();
}

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