Files
alrahma_sunday_school_api/tests/Unit/Services/System/GlobalConfigServiceTest.php
T
2026-03-11 01:38:20 -04:00

27 lines
725 B
PHP

<?php
namespace Tests\Unit\Services\System;
use App\Services\System\GlobalConfigService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class GlobalConfigServiceTest extends TestCase
{
use RefreshDatabase;
public function test_get_semester_and_school_year(): void
{
DB::table('configuration')->insert([
['config_key' => 'semester', 'config_value' => 'Fall'],
['config_key' => 'school_year', 'config_value' => '2024-2025'],
]);
$service = new GlobalConfigService();
$this->assertSame('Fall', $service->getSemester());
$this->assertSame('2024-2025', $service->getSchoolYear());
}
}