<?php

use App\Enums\MediaType;

test('media type enum has expected cases', function () {
    expect(MediaType::cases())->toHaveCount(4);
});

test('media type enum labels', function (MediaType $type, string $label) {
    expect($type->getLabel())->toBe($label);
})->with([
    [MediaType::ONLINE, 'Online'],
    [MediaType::PRINT, 'Cetak'],
    [MediaType::RADIO, 'Radio'],
    [MediaType::TELEVISION, 'Televisi'],
]);

test('media type enum options', function () {
    expect(MediaType::options())->toEqual([
        1 => 'Online',
        2 => 'Cetak',
        3 => 'Radio',
        4 => 'Televisi',
    ]);
});

test('media type enum values and comment', function () {
    expect(MediaType::values())->toEqual([1, 2, 3, 4]);
    expect(MediaType::comment())->toBe('1: Online, 2: Cetak, 3: Radio, 4: Televisi');
});
