26 lines
605 B
PHP
26 lines
605 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PHPNative\Tailwind\Tests;
|
|
|
|
use PHPNative\Tailwind\Parser\Background;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* @internal
|
|
* @small
|
|
*/
|
|
class BackgroundTest extends TestCase
|
|
{
|
|
public function test_background(): void
|
|
{
|
|
$bg = Background::parse("bg-slate-300");
|
|
$this->assertInstanceOf(\PHPNative\Tailwind\Style\Background::class, $bg);
|
|
$this->assertSame(203, $bg->color->red);
|
|
$this->assertSame(213, $bg->color->green);
|
|
$this->assertSame(225, $bg->color->blue);
|
|
$this->assertSame(0, $bg->color->alpha);
|
|
}
|
|
}
|