Files
alrahma_sunday_school_api/tests/Unit/Models/NavItemTest.php
T
2026-06-09 02:32:58 -04:00

27 lines
850 B
PHP

<?php
namespace Tests\Unit\Models;
use App\Models\NavItem;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Eloquent\SoftDeletes;
class NavItemTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new NavItem();
$this->assertSame('nav_items', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(["menu_parent_id", "label", "url", "icon_class", "target", "sort_order", "is_enabled", "created_at", "updated_at", "deleted_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(NavItem::class, new NavItem());
$this->assertContains(SoftDeletes::class, class_uses_recursive(NavItem::class));
}
}