add class progress and fix endpoints

This commit is contained in:
root
2026-03-12 17:27:49 -04:00
parent 0f39dbee62
commit 33be0c9a0d
40 changed files with 2086 additions and 438 deletions
@@ -0,0 +1,27 @@
<?php
namespace Tests\Unit\Services\ClassProgress;
use App\Services\ClassProgress\ClassProgressRuleService;
use PHPUnit\Framework\TestCase;
class ClassProgressRuleServiceTest extends TestCase
{
public function test_build_unit_chapter_summary_limits_length(): void
{
$service = new ClassProgressRuleService();
$summary = $service->buildUnitChapterSummary(['Unit 1'], ['Chapter A']);
$this->assertSame('Unit 1 / Chapter A', $summary);
}
public function test_ensure_week_end_defaults_to_six_days(): void
{
$service = new ClassProgressRuleService();
$weekEnd = $service->ensureWeekEnd('2025-09-07', null);
$this->assertSame('2025-09-13', $weekEnd);
}
}