<?php

namespace Tests\Unit\Services\Administrator;

use App\Services\Administrator\AdministratorSharedService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class AdministratorSharedServiceTest extends TestCase
{
    use RefreshDatabase;

    public function test_get_previous_school_year(): void
    {
        $service = new AdministratorSharedService(new \App\Models\Configuration());

        $this->assertSame('2024-2025', $service->getPreviousSchoolYear('2025-2026'));
        $this->assertSame('2024-25', $service->getPreviousSchoolYear('2025-26'));
        $this->assertSame('2024', $service->getPreviousSchoolYear('2025'));
    }
}
