framework/src/PHPNative/Tailwind/tests/BackgroundTest.php
2024-09-14 09:47:55 +02:00

22 lines
573 B
PHP

<?php
declare(strict_types=1);
namespace PHPNative\Tailwind\Tests;
use PHPNative\Tailwind\Parser\Background;
use PHPUnit\Framework\TestCase;
class BackgroundTest extends TestCase
{
public function testBackground(): 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);
}
}