public function ColorTest::testRgbToHex

Tests Color::rgbToHex().

@dataProvider providerTestRbgToHex

Parameters

string $value: The rgb color value.

string $expected: The expected hex color value.

File

drupal/core/tests/Drupal/Tests/Core/Utility/ColorTest.php, line 99
Contains \Drupal\Tests\Core\Utility\ColorTest.

Class

ColorTest
Tests color conversion functions.

Namespace

Drupal\Tests\Core\Utility

Code

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