add services logic

This commit is contained in:
root
2026-03-11 01:38:20 -04:00
parent 182036cc41
commit 3e6c577085
47 changed files with 918 additions and 1772 deletions
@@ -0,0 +1,26 @@
<?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());
}
}