<?php

use App\Enums\SocialMedia;

test('social media enum has expected cases', function () {
    expect(SocialMedia::cases())->toHaveCount(3);
});

test('social media enum labels', function (SocialMedia $media, string $label) {
    expect($media->getLabel())->toBe($label);
})->with([
    [SocialMedia::PPID_DISKOMINFO_PURWAKARTA, 'PPID Diskominfo Purwakarta'],
    [SocialMedia::DISKOMINFO_PURWAKARTA, 'Diskominfo Purwakarta'],
    [SocialMedia::PURWAKARTA_SABER_HOAKS, 'Purwakarta Saber Hoaks'],
]);

test('social media enum options', function () {
    expect(SocialMedia::options())->toEqual([
        1 => 'PPID Diskominfo Purwakarta',
        2 => 'Diskominfo Purwakarta',
        3 => 'Purwakarta Saber Hoaks',
    ]);
});

test('social media enum values and comment', function () {
    expect(SocialMedia::values())->toEqual([1, 2, 3]);
    expect(SocialMedia::comment())->toBe('1: PPID Diskominfo Purwakarta, 2: Diskominfo Purwakarta, 3: Purwakarta Saber Hoaks');
});
