30 lines
805 B
PHP
30 lines
805 B
PHP
<?php
|
|
|
|
namespace Tests\Unit\Services\Attendance;
|
|
|
|
use App\Services\Attendance\SemesterRangeService;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AttendanceSemesterRangeServiceTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
public function test_get_semester_range(): void
|
|
{
|
|
$service = new SemesterRangeService;
|
|
$range = $service->getSemesterRange('2025-2026', 'fall');
|
|
|
|
$this->assertSame(['2025-09-21', '2026-01-18'], $range);
|
|
}
|
|
|
|
public function test_build_sunday_list_returns_sundays(): void
|
|
{
|
|
$service = new SemesterRangeService;
|
|
$dates = $service->buildSundayList('2025-09-01', '2025-09-30');
|
|
|
|
$this->assertContains('2025-09-07', $dates);
|
|
$this->assertContains('2025-09-14', $dates);
|
|
}
|
|
}
|