<?php

use App\Enums\CooperationStatus;

test('cooperation status enum has expected cases', function () {
    expect(CooperationStatus::cases())->toHaveCount(5);
});

test('cooperation status enum labels and colors', function (CooperationStatus $status, string $label, string $color) {
    expect($status->getLabel())->toBe($label);
    expect($status->getColor())->toBe($color);
})->with([
    [CooperationStatus::PENDING, 'Menunggu', 'warning'],
    [CooperationStatus::ASSIGNMENT, 'Media Order', 'info'],
    [CooperationStatus::VERIFICATION, 'Verifikasi', 'primary'],
    [CooperationStatus::PAYMENT, 'Pembayaran', 'slate'],
    [CooperationStatus::COMPLETED, 'Selesai', 'success'],
]);

test('cooperation status enum options', function () {
    expect(CooperationStatus::options())->toEqual([
        1 => 'Menunggu',
        2 => 'Media Order',
        3 => 'Verifikasi',
        4 => 'Pembayaran',
        5 => 'Selesai',
    ]);
});

test('cooperation status enum values and comment', function () {
    expect(CooperationStatus::values())->toEqual([1, 2, 3, 4, 5]);
    expect(CooperationStatus::comment())->toBe('1: Menunggu, 2: Media Order, 3: Verifikasi, 4: Pembayaran, 5: Selesai');
});
