function FontFamilyTest::providerToCss
Data provider for ::testToCss().
Return value
\Generator The test cases.
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ DesignToken/ Plugin/ FontFamilyTest.php, line 74
Class
- FontFamilyTest
- Tests font family value plugin.
Namespace
Drupal\Tests\Core\Theme\DesignToken\PluginCode
public static function providerToCss() : iterable {
yield 'string' => [
'Arial',
'Arial',
];
yield 'list' => [
[
'Arial',
'sans-serif',
],
'Arial, sans-serif',
];
yield 'XSS' => [
[
'Arial',
'<script>alert()</script>',
],
'Arial, <script>alert()</script>',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.