function ExtractorTest::testLoadIconMissingData

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Theme/Icon/Plugin/ExtractorTest.php \Drupal\Tests\Core\Theme\Icon\Plugin\ExtractorTest::testLoadIconMissingData()

Test the IconExtractorBase:loadIcon with missing data.

File

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

Class

ExtractorTest
Tests icon extractor with base and finder base plugin.

Namespace

Drupal\Tests\Core\Theme\Icon\Plugin

Code

public function testLoadIconMissingData() : void {
  $extractorPlugin = new TestExtractor([
    'id' => $this->pluginId,
    'template' => '_bar_',
  ], $this->pluginId, []);
  $icon = $extractorPlugin->loadIcon([]);
  $this->assertNull($icon);
}

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