function ExtractorTest::testGetFilesFromSourcesExceptionRelativePath
Test the IconExtractorWithFinder::getFilesFromSources method.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Icon/ Plugin/ ExtractorTest.php, line 228
Class
- ExtractorTest
- Tests icon extractor with base and finder base plugin.
Namespace
Drupal\Tests\Core\Theme\Icon\PluginCode
public function testGetFilesFromSourcesExceptionRelativePath() : void {
$pathExtractorPlugin = new TestExtractorWithFinder([
'config' => [
'sources' => [
'foo/bar',
],
],
], $this->pluginId, [
'label' => 'Test',
'description' => 'Test description',
], $this->createMock(IconFinder::class));
$this->expectException(IconPackConfigErrorException::class);
$this->expectExceptionMessage('Empty relative path for extractor test_extractor.');
$pathExtractorPlugin->discoverIcons();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.