function IconPackManagerKernelTest::testProcessDefinitionDisabled

Test the IconPackManager::processDefinition method with disable pack.

File

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

Class

IconPackManagerKernelTest
@coversDefaultClass \Drupal\Core\Theme\Icon\Plugin\IconPackManager

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.