function IconDefinitionTest::testCreateIconError
Test the IconDefinition::create method with errors.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Icon/ IconDefinitionTest.php, line 164
Class
- IconDefinitionTest
- @coversDefaultClass \Drupal\Core\Theme\Icon\IconDefinition
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.