function OliveroHexToHslTest::testHexToHsl

Same name in other branches
  1. 11.x core/themes/olivero/tests/src/Unit/OliveroHexToHslTest.php \Drupal\Tests\olivero\Unit\OliveroHexToHslTest::testHexToHsl()

Tests hex to HSL conversion.

@dataProvider hexCodes

Parameters

string $hex: The hex code.

array $expected_hsl: The expected HSL values.

File

core/themes/olivero/tests/src/Unit/OliveroHexToHslTest.php, line 34

Class

OliveroHexToHslTest
Tests the _olivero_hex_to_hsl() function.

Namespace

Drupal\Tests\olivero\Unit

Code

public function testHexToHsl(string $hex, array $expected_hsl) : void {
    self::assertEquals($expected_hsl, _olivero_hex_to_hsl($hex));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.