add projet
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user