<?php

namespace Tests\Unit\Models;

use App\Models\EmergencyContact;
use PHPUnit\Framework\TestCase;

class EmergencyContactTest extends TestCase
{
    public function test_model_metadata_is_converted(): void
    {
        $model = new EmergencyContact();

        $this->assertSame('emergency_contacts', $model->getTable());
        $this->assertSame('id', $model->getKeyName());
        $this->assertSame(true, $model->timestamps);
        $this->assertSame(["emergency_contact_name", "parent_id", "cellphone", "email", "relation", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
    }

    public function test_model_class_loads(): void
    {
        $this->assertInstanceOf(EmergencyContact::class, new EmergencyContact());
    }
}
