add more controller

This commit is contained in:
root
2026-03-10 00:48:32 -04:00
parent 5eeaec0257
commit 20ee70d153
151 changed files with 9481 additions and 8407 deletions
@@ -0,0 +1,35 @@
<?php
namespace Tests\Unit\Services\Parents;
use App\Services\Parents\ParentConfigService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class ParentConfigServiceTest extends TestCase
{
use RefreshDatabase;
public function test_context_returns_config_values(): void
{
DB::table('configuration')->insert([
['config_key' => 'school_year', 'config_value' => '2025-2026'],
['config_key' => 'semester', 'config_value' => 'Fall'],
['config_key' => 'date_age_reference', 'config_value' => '2025-12-31'],
['config_key' => 'max_kids', 'config_value' => '4'],
['config_key' => 'max_emergency', 'config_value' => '2'],
['config_key' => 'enrollment_deadline', 'config_value' => '2025-09-01'],
['config_key' => 'refund_deadline', 'config_value' => '2025-09-15'],
['config_key' => 'fall_semester_start', 'config_value' => '2025-09-05'],
]);
$service = new ParentConfigService();
$context = $service->context();
$this->assertSame('2025-2026', $context['school_year']);
$this->assertSame('Fall', $context['semester']);
$this->assertSame(4, $context['max_kids']);
$this->assertSame(2, $context['max_emergency']);
}
}