add services logic
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user