<?php

namespace Tests\Unit;

use App\Enums\AppointmentStatus;
use PHPUnit\Framework\TestCase;

class AppointmentStatusTest extends TestCase
{
    public function test_state_machine_matches_core_workflow(): void
    {
        $this->assertContains(AppointmentStatus::CHECKED_IN, AppointmentStatus::CONFIRMED->allowedNext());
        $this->assertContains(AppointmentStatus::WAITING, AppointmentStatus::CHECKED_IN->allowedNext());
        $this->assertContains(AppointmentStatus::WITH_DOCTOR, AppointmentStatus::WAITING->allowedNext());
        $this->assertContains(AppointmentStatus::COMPLETED, AppointmentStatus::WITH_DOCTOR->allowedNext());
        $this->assertSame([], AppointmentStatus::COMPLETED->allowedNext());
    }
}
