<?php

use App\Enums\ContentType;

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

test('content type enum labels and colors', function (ContentType $type, string $label, string $color) {
    expect($type->getLabel())->toBe($label);
    expect($type->getColor())->toBe($color);
})->with([
    [ContentType::FOTO, 'Foto', 'info'],
    [ContentType::TEXT, 'Teks', 'success'],
    [ContentType::GRAPHIC, 'Grafis', 'warning'],
    [ContentType::VIDEO, 'Video', 'danger'],
]);

test('content type enum options', function () {
    expect(ContentType::options())->toEqual([
        1 => 'Foto',
        2 => 'Teks',
        3 => 'Grafis',
        4 => 'Video',
    ]);
});

test('content type enum values and comment', function () {
    expect(ContentType::values())->toEqual([1, 2, 3, 4]);
    expect(ContentType::comment())->toBe('1: Foto, 2: Teks, 3: Grafis, 4: Video');
});
