<?php

declare(strict_types=1);

namespace App\Tests\Unit\Administration\Domain\Model\User;

use App\Administration\Domain\Model\User\ImageRightsStatus;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

final class ImageRightsStatusTest extends TestCase
{
    #[Test]
    public function allCasesHaveLabels(): void
    {
        foreach (ImageRightsStatus::cases() as $status) {
            self::assertNotEmpty($status->label());
        }
    }

    #[Test]
    public function authorizedEstAutorise(): void
    {
        self::assertTrue(ImageRightsStatus::AUTHORIZED->estAutorise());
    }

    #[Test]
    public function refusedNEstPasAutorise(): void
    {
        self::assertFalse(ImageRightsStatus::REFUSED->estAutorise());
    }

    #[Test]
    public function notSpecifiedNEstPasAutorise(): void
    {
        self::assertFalse(ImageRightsStatus::NOT_SPECIFIED->estAutorise());
    }

    #[Test]
    public function backedValuesAreCorrect(): void
    {
        self::assertSame('authorized', ImageRightsStatus::AUTHORIZED->value);
        self::assertSame('refused', ImageRightsStatus::REFUSED->value);
        self::assertSame('not_specified', ImageRightsStatus::NOT_SPECIFIED->value);
    }
}
