You are here

public function ColorTest::testNormalizeHexLength in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/ColorTest.php \Drupal\Tests\Component\Utility\ColorTest::testNormalizeHexLength()

Tests Color::normalizeHexLength().

@dataProvider providerTestNormalizeHexLength

Parameters

string $value: The input hex color value.

string $expected: The expected normalized hex color value.

File

core/tests/Drupal/Tests/Component/Utility/ColorTest.php, line 209

Class

ColorTest
Tests Color utility class conversions.

Namespace

Drupal\Tests\Component\Utility

Code

public function testNormalizeHexLength($value, $expected) {
  $this
    ->assertSame($expected, Color::normalizeHexLength($value));
}