function DesignTokenEntityTest::providerGetCssVariableName
Data provider for ::testGetCssVariableName().
Return value
\Generator The test cases.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ DesignToken/ DesignTokenEntityTest.php, line 97
Class
- DesignTokenEntityTest
- Tests design token entity.
Namespace
Drupal\Tests\Core\Theme\DesignTokenCode
public static function providerGetCssVariableName() : iterable {
yield 'Simple' => [
'myPath',
'--myPath',
];
yield 'With underscores' => [
'my_token_path',
'--my-token-path',
];
yield 'With spaces' => [
'my token path',
'--my-token-path',
];
yield 'With dots' => [
'my.token.path',
'--my-token-path',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.