clean install

This commit is contained in:
2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 changed files with 3555714 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace Drupal\Tests\olivero\Functional;
use Drupal\Tests\system\Functional\Theme\NodeTitleTestBase;
/**
* Tests node title for olivero.
*
* @group node
*/
class NodeTitleTest extends NodeTitleTestBase {
}

View File

@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
namespace Drupal\Tests\olivero\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Tests the update path for Olivero.
*
* @group Update
* @group #slow
*/
class OliveroPostUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../../modules/system/tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz',
];
}
/**
* Tests update hook setting base primary color.
*/
public function testOliveroPrimaryColorUpdate(): void {
$config = $this->config('olivero.settings');
$this->assertEmpty($config->get('base_primary_color'));
// Run updates.
$this->runUpdates();
$config = $this->config('olivero.settings');
$this->assertSame('#1b9ae4', $config->get('base_primary_color'));
}
}

View File

@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
namespace Drupal\Tests\olivero\Unit;
use Drupal\Tests\UnitTestCase;
/**
* Tests the _olivero_hex_to_hsl() function.
*
* @group olivero
*/
final class OliveroHexToHslTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp(): void {
parent::setUp();
require_once __DIR__ . '/../../../olivero.theme';
}
/**
* Tests hex to HSL conversion.
*
* @param string $hex
* The hex code.
* @param array $expected_hsl
* The expected HSL values.
*
* @dataProvider hexCodes
*/
public function testHexToHsl(string $hex, array $expected_hsl): void {
self::assertEquals($expected_hsl, _olivero_hex_to_hsl($hex));
}
/**
* Data provider of hex codes and HSL values.
*
* @return array[]
* The test data.
*/
public static function hexCodes(): array {
return [
'Blue Lagoon' => ['#1b9ae4', [202, 79, 50]],
'Firehouse' => ['#a30f0f', [0, 83, 35]],
'Ice' => ['#57919e', [191, 29, 48]],
'Plum' => ['#7a4587', [288, 32, 40]],
'Slate' => ['#47625b', [164, 16, 33]],
];
}
}