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

27 lines
978 B
PHP

<?php
namespace Tests\Unit\Models;
use App\Models\Notification;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Eloquent\SoftDeletes;
class NotificationTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Notification();
$this->assertSame('notifications', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(["title", "message", "target_group", "delivery_channels", "priority", "status", "action_url", "attachment_path", "scheduled_at", "sent_at", "expires_at", "created_at", "updated_at", "deleted_at", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Notification::class, new Notification());
$this->assertContains(SoftDeletes::class, class_uses_recursive(Notification::class));
}
}