function IconPackManagerKernelTest::testProcessDefinitionDisabled

Test the IconPackManager::processDefinition method with disable pack.

File

core/tests/Drupal/KernelTests/Core/Theme/Icon/IconPackManagerKernelTest.php, line 345

Class

IconPackManagerKernelTest
Tests values are from test module icon_test.

Namespace

Drupal\KernelTests\Core\Theme\Icon

Code

public function testProcessDefinitionDisabled() : void {
  $definition = [
    'id' => 'foo',
    'enabled' => FALSE,
    'provider' => 'icon_test',
    'extractor' => 'bar',
    'template' => '',
  ];
  $this->pluginManagerIconPack
    ->processDefinition($definition, 'foo');
  $this->assertSame('foo', $definition['id']);
  $this->assertArrayNotHasKey('relative_path', $definition);
  $this->assertArrayNotHasKey('absolute_path', $definition);
  $this->assertArrayNotHasKey('icons', $definition);
}

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