Files
kazi/tests/Feature/Component/CardTest.php
Pedro Cabral 38df2d4fc8 added card component
Co-authored-by: Copilot <copilot@github.com>
2026-05-08 22:06:56 +02:00

35 lines
904 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Feature\Component;
use Tests\TestCase;
class CardTest extends TestCase
{
public function testCardWithHeader(): void
{
$view = $this->blade('<x-card header="Test Header">Card Content</x-card>');
$view->assertSeeHtml('<div class="card-header ');
$view->assertSeeHtml('<h3 class="font-semibold">Test Header</h3>');
}
public function testCardWithoutHeader(): void
{
$view = $this->blade('<x-card>Card Content</x-card>');
$view->assertDontSeeHtml('<div class="card-header ');
$view->assertDontSeeHtml('<h3 class="font-semibold">');
}
public function testCardContent(): void
{
$cardContent = '<p class="card-content">This is the card content.</p>';
$view = $this->blade("<x-card>{$cardContent}</x-card>");
$view->assertSeeHtml($cardContent);
}
}