fix gitlab tests
This commit is contained in:
@@ -14,7 +14,7 @@ class LevelProgressionServiceTest extends TestCase
|
||||
|
||||
public function test_seed_defaults_creates_baseline_levels(): void
|
||||
{
|
||||
$service = new LevelProgressionService;
|
||||
$service = new LevelProgressionService();
|
||||
$created = $service->seedDefaults();
|
||||
$this->assertGreaterThan(0, $created);
|
||||
$this->assertSame($created, LevelProgression::query()->count());
|
||||
@@ -35,7 +35,7 @@ class LevelProgressionServiceTest extends TestCase
|
||||
['id' => 8, 'class_name' => 'Grade 4', 'school_year' => '2025-2026', 'semester' => 'Fall', 'capacity' => 0],
|
||||
]);
|
||||
|
||||
$service = new LevelProgressionService;
|
||||
$service = new LevelProgressionService();
|
||||
$service->seedDefaults();
|
||||
|
||||
$resolved = $service->resolveByCurrentClassId(7);
|
||||
@@ -53,7 +53,7 @@ class LevelProgressionServiceTest extends TestCase
|
||||
['id' => 101, 'class_name' => 'Custom B', 'school_year' => '2025-2026', 'semester' => 'Fall', 'capacity' => 0],
|
||||
]);
|
||||
|
||||
$service = new LevelProgressionService;
|
||||
$service = new LevelProgressionService();
|
||||
$resolved = $service->resolveByCurrentClassId(100);
|
||||
|
||||
$this->assertNotNull($resolved);
|
||||
@@ -64,7 +64,7 @@ class LevelProgressionServiceTest extends TestCase
|
||||
|
||||
public function test_upsert_mapping_updates_existing_row(): void
|
||||
{
|
||||
$service = new LevelProgressionService;
|
||||
$service = new LevelProgressionService();
|
||||
$service->upsertMapping([
|
||||
'current_level_name' => 'Grade 5',
|
||||
'next_level_name' => 'Grade 6',
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Tests\Unit\Services\Promotions;
|
||||
|
||||
use App\Models\LevelProgression;
|
||||
use App\Models\StudentPromotionRecord;
|
||||
use App\Services\Promotions\LevelProgressionService;
|
||||
use App\Services\Promotions\PromotionAuditService;
|
||||
@@ -76,7 +75,7 @@ class PromotionEligibilityServiceTest extends TestCase
|
||||
$this->seedDecision($studentId, '2025-2026', 90.0, 'promoted');
|
||||
|
||||
// Mark Youth as terminal
|
||||
LevelProgression::query()->where('current_level_name', 'Youth')->update(['is_terminal' => 1]);
|
||||
\App\Models\LevelProgression::query()->where('current_level_name', 'Youth')->update(['is_terminal' => 1]);
|
||||
|
||||
$service = $this->makeService();
|
||||
$record = $service->evaluateStudent($studentId, '2025-2026', 1);
|
||||
@@ -109,10 +108,9 @@ class PromotionEligibilityServiceTest extends TestCase
|
||||
|
||||
private function makeService(): PromotionEligibilityService
|
||||
{
|
||||
$progression = new LevelProgressionService;
|
||||
$audit = new PromotionAuditService;
|
||||
$progression = new LevelProgressionService();
|
||||
$audit = new PromotionAuditService();
|
||||
$status = new PromotionStatusService($audit);
|
||||
|
||||
return new PromotionEligibilityService($progression, $status, $audit);
|
||||
}
|
||||
|
||||
@@ -175,4 +173,4 @@ class PromotionEligibilityServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class PromotionEnrollmentServiceTest extends TestCase
|
||||
*/
|
||||
private function bootstrap(): array
|
||||
{
|
||||
$audit = new PromotionAuditService;
|
||||
$audit = new PromotionAuditService();
|
||||
$service = new PromotionEnrollmentService(new PromotionStatusService($audit), $audit);
|
||||
|
||||
$parentId = (int) DB::table('users')->insertGetId([
|
||||
|
||||
@@ -82,7 +82,7 @@ class PromotionStatusServiceTest extends TestCase
|
||||
|
||||
private function makeService(): PromotionStatusService
|
||||
{
|
||||
return new PromotionStatusService(new PromotionAuditService);
|
||||
return new PromotionStatusService(new PromotionAuditService());
|
||||
}
|
||||
|
||||
private function makeRecord(string $status): StudentPromotionRecord
|
||||
|
||||
Reference in New Issue
Block a user