add all controllers logic

This commit is contained in:
root
2026-03-11 17:53:15 -04:00
parent 3e6c577085
commit 2ef71cc92b
421 changed files with 12009 additions and 5211 deletions
@@ -0,0 +1,29 @@
<?php
namespace Tests\Unit\Services\Frontend;
use App\Services\Frontend\LandingPageContextService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class LandingPageContextServiceTest 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' => 'enrollment_deadline', 'config_value' => '2025-09-01'],
['config_key' => 'refund_deadline', 'config_value' => '2025-10-01'],
]);
$service = app(LandingPageContextService::class);
$context = $service->context();
$this->assertSame('2025-2026', $context['school_year']);
$this->assertSame('Fall', $context['semester']);
}
}