public function TwigColorTest::providerTestHexToCssRgbValues in Twig Tools 8
Provides test data for hexToRgbTest.
Return value
array An array of test data with twig values and their hex equivalents.
File
- tests/
src/ Unit/ TwigColorTest.php, line 151
Class
- TwigColorTest
- Tests to ensure color convert filters work correctly.
Namespace
Drupal\Tests\twig_tools\UnitCode
public function providerTestHexToCssRgbValues() {
return [
[
"{{ '#ffffff'|hex_to_css_rgb }}",
'rgb(255, 255, 255)',
],
[
"{{ '#FFFFFF'|hex_to_css_rgb }}",
'rgb(255, 255, 255)',
],
[
"{{ '#a0c677'|hex_to_css_rgb }}",
'rgb(160, 198, 119)',
],
[
"{{ '#8e2f2f'|hex_to_css_rgb }}",
'rgb(142, 47, 47)',
],
[
"{{ '#090a0b'|hex_to_css_rgb }}",
'rgb(9, 10, 11)',
],
[
"{{ '#636465'|hex_to_css_rgb }}",
'rgb(99, 100, 101)',
],
[
"{{ '#c7c8c9'|hex_to_css_rgb }}",
'rgb(199, 200, 201)',
],
[
"{{ '#000000'|hex_to_css_rgb }}",
'rgb(0, 0, 0)',
],
[
"{{ '#fff'|hex_to_css_rgb }}",
'rgb(255, 255, 255)',
],
[
"{{ '#FFF'|hex_to_css_rgb }}",
'rgb(255, 255, 255)',
],
[
"{{ '#zzzzzz'|hex_to_css_rgb }}",
'',
],
[
"{{ '#ffffffff'|hex_to_css_rgb }}",
'',
],
];
}