function IconPackManagerKernelTest::testProcessDefinitionExceptionName
Test the IconPackManager::processDefinition method with exception.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ Icon/ IconPackManagerKernelTest.php, line 365
Class
- IconPackManagerKernelTest
- @coversDefaultClass \Drupal\Core\Theme\Icon\Plugin\IconPackManager
Namespace
Drupal\KernelTests\Core\Theme\IconCode
public function testProcessDefinitionExceptionName() : void {
$definition = [
'provider' => 'foo',
];
$this->expectException(IconPackConfigErrorException::class);
$this->expectExceptionMessage('Invalid icon pack id in: foo, name: $ Not valid !* must contain only lowercase letters, numbers, and underscores.');
$this->pluginManagerIconPack
->processDefinition($definition, '$ Not valid !*');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.