function DesignTokenTest::providerGetPath
Same name and namespace in other branches
- main core/tests/Drupal/Tests/Core/Theme/DesignToken/DesignTokenTest.php \Drupal\Tests\Core\Theme\DesignToken\DesignTokenTest::providerGetPath()
Data provider for ::testGetPath().
Return value
\Generator The test cases.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ DesignToken/ DesignTokenTest.php, line 95
Class
- DesignTokenTest
- Tests design token object.
Namespace
Drupal\Tests\Core\Theme\DesignTokenCode
public static function providerGetPath() : iterable {
yield 'Root' => [
'myPath',
NULL,
'myPath',
];
yield 'With parent' => [
'myPath',
new DesignTokenGroup('test', 'parentName'),
'parentName.myPath',
];
yield 'With parent with parent' => [
'myPath',
new DesignTokenGroup('test', 'parentName', parent: new DesignTokenGroup('test', 'parentName2')),
'parentName2.parentName.myPath',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.