You are here

public function ColorTest::testValidateHex 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::testValidateHex()

@covers \Drupal\Component\Utility\Color::validateHex

@dataProvider providerTestValidateHex()

Parameters

bool $expected: The expected result of validation.

string $value: The hex color value.

File

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

Class

ColorTest
Tests Color utility class conversions.

Namespace

Drupal\Tests\Component\Utility

Code

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