function IconDefinitionTest::testCreateIconHumanize
Test the IconDefinition::humanize method.
@dataProvider providerCreateIconHumanize
Parameters
string $icon_id: The icon id.
string $expected: The expected label.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Icon/ IconDefinitionTest.php, line 216
Class
- IconDefinitionTest
- @coversDefaultClass \Drupal\Core\Theme\Icon\IconDefinition
Namespace
Drupal\Tests\Core\Theme\IconCode
public function testCreateIconHumanize(string $icon_id, string $expected) : void {
$icon = IconDefinition::create('bar', $icon_id, 'baz');
$this->assertEquals($expected, $icon->getLabel());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.