function ColorTest::providerTestNormalizeHexLength
Data provider for testNormalizeHexLength().
Return value
array An array of arrays containing:
- The hex color value.
- The 6 character length hex color value.
See also
testNormalizeHexLength()
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ ColorTest.php, line 185
Class
- ColorTest
- Tests Color utility class conversions.
Namespace
Drupal\Tests\Component\UtilityCode
public static function providerTestNormalizeHexLength() {
$data = [
[
'#000',
'#000000',
],
[
'#FFF',
'#FFFFFF',
],
[
'#abc',
'#aabbcc',
],
[
'cba',
'#ccbbaa',
],
[
'#000000',
'#000000',
],
[
'ffffff',
'#ffffff',
],
[
'#010203',
'#010203',
],
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.