add class progress and fix endpoints
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user