function IconDefinitionTest::testCreateIconError
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Theme/Icon/IconDefinitionTest.php \Drupal\Tests\Core\Theme\Icon\IconDefinitionTest::testCreateIconError()
Test the IconDefinition::create method with errors.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Icon/ IconDefinitionTest.php, line 166
Class
Namespace
Drupal\Tests\Core\Theme\IconCode
public function testCreateIconError() : void {
$this->expectException(IconDefinitionInvalidDataException::class);
$this->expectExceptionMessage('Empty pack_id provided! Empty icon_id provided! Empty template provided!');
IconDefinition::create('', '', '');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.