function DimensionTest::providerToCss
Data provider for ::testToCss().
Return value
\Generator The test cases.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ DesignToken/ Plugin/ DimensionTest.php, line 95
Class
- DimensionTest
- Tests dimension value plugin.
Namespace
Drupal\Tests\Core\Theme\DesignToken\PluginCode
public static function providerToCss() : iterable {
yield 'px' => [
[
'value' => 12,
'unit' => 'px',
],
'12px',
];
yield 'rem' => [
[
'value' => 2,
'unit' => 'rem',
],
'2rem',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.