<?php

declare(strict_types=1);

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

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

final class SchoolZoneTest extends TestCase
{
    #[Test]
    public function zoneAContientLyonEtBordeaux(): void
    {
        $academies = SchoolZone::A->academies();

        self::assertContains('Lyon', $academies);
        self::assertContains('Bordeaux', $academies);
        self::assertContains('Grenoble', $academies);
    }

    #[Test]
    public function zoneBContientLilleEtNantes(): void
    {
        $academies = SchoolZone::B->academies();

        self::assertContains('Lille', $academies);
        self::assertContains('Nantes', $academies);
        self::assertContains('Strasbourg', $academies);
    }

    #[Test]
    public function zoneCContientParisEtToulouse(): void
    {
        $academies = SchoolZone::C->academies();

        self::assertContains('Paris', $academies);
        self::assertContains('Toulouse', $academies);
        self::assertContains('Versailles', $academies);
    }

    #[Test]
    public function backedValues(): void
    {
        self::assertSame('A', SchoolZone::A->value);
        self::assertSame('B', SchoolZone::B->value);
        self::assertSame('C', SchoolZone::C->value);
    }

    #[Test]
    public function chaqueZoneADesAcademies(): void
    {
        foreach (SchoolZone::cases() as $zone) {
            self::assertNotEmpty($zone->academies());
        }
    }
}
