function IconPackManagerKernelTest::testListIconPackOptions
Test the IconPackManager::listIconPackOptions method.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ Icon/ IconPackManagerKernelTest.php, line 120
Class
- IconPackManagerKernelTest
- @coversDefaultClass \Drupal\Core\Theme\Icon\Plugin\IconPackManager
Namespace
Drupal\KernelTests\Core\Theme\IconCode
public function testListIconPackOptions() : void {
$actual = $this->pluginManagerIconPack
->listIconPackOptions();
$expected = [
'test_minimal' => 'test_minimal (1)',
'test_path' => 'Test path (10)',
'test_svg' => 'Test svg (12)',
'test_svg_sprite' => 'Test sprite (3)',
'test_no_settings' => 'test_no_settings (1)',
'test_settings' => 'Test settings (1)',
'test_url_path' => 'Test url path (2)',
];
$this->assertEquals($expected, $actual);
$actual = $this->pluginManagerIconPack
->listIconPackOptions(TRUE);
$expected = [
'test_minimal' => 'test_minimal (1)',
'test_path' => 'Test path - Local png files available for test with all metadata. (10)',
'test_svg' => 'Test svg (12)',
'test_svg_sprite' => 'Test sprite (3)',
'test_no_settings' => 'test_no_settings (1)',
'test_settings' => 'Test settings (1)',
'test_url_path' => 'Test url path (2)',
];
$this->assertEquals($expected, $actual);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.