add projet
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Models;
|
||||
|
||||
use App\Models\Preferences;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class PreferencesTest extends TestCase
|
||||
{
|
||||
public function test_model_metadata_is_converted(): void
|
||||
{
|
||||
$model = new Preferences();
|
||||
|
||||
$this->assertSame('user_preferences', $model->getTable());
|
||||
$this->assertSame('id', $model->getKeyName());
|
||||
$this->assertSame(true, $model->timestamps);
|
||||
$this->assertSame(["user_id", "notification_email", "notification_sms", "theme", "language", "style_color", "menu_color", "menu_custom_bg", "menu_custom_text", "menu_custom_mode", "created_at", "updated_at"], $model->getFillable());
|
||||
}
|
||||
|
||||
public function test_model_class_loads(): void
|
||||
{
|
||||
$this->assertInstanceOf(Preferences::class, new Preferences());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user