<?php

declare(strict_types=1);

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

use App\Administration\Domain\Model\SchoolCalendar\CalendarEntryType;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

final class CalendarEntryTypeTest extends TestCase
{
    #[Test]
    public function chaqueTypeAUnLabel(): void
    {
        foreach (CalendarEntryType::cases() as $type) {
            self::assertNotEmpty($type->label());
        }
    }

    #[Test]
    public function labelsAttendus(): void
    {
        self::assertSame('Jour férié', CalendarEntryType::HOLIDAY->label());
        self::assertSame('Vacances scolaires', CalendarEntryType::VACATION->label());
        self::assertSame('Journée pédagogique', CalendarEntryType::PEDAGOGICAL_DAY->label());
        self::assertSame('Pont', CalendarEntryType::BRIDGE->label());
        self::assertSame('Fermeture exceptionnelle', CalendarEntryType::EXCEPTIONAL_CLOSURE->label());
    }

    #[Test]
    public function backedValuesConsistantes(): void
    {
        self::assertSame('holiday', CalendarEntryType::HOLIDAY->value);
        self::assertSame('vacation', CalendarEntryType::VACATION->value);
        self::assertSame('pedagogical', CalendarEntryType::PEDAGOGICAL_DAY->value);
        self::assertSame('bridge', CalendarEntryType::BRIDGE->value);
        self::assertSame('closure', CalendarEntryType::EXCEPTIONAL_CLOSURE->value);
    }
}
