fix deployment db issue and widthrawal administration page
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 47s
Tests / PHPUnit (push) Failing after 1m19s

This commit is contained in:
root
2026-08-20 20:18:00 -04:00
parent 889c037660
commit d3da699e55
19 changed files with 1170 additions and 194 deletions
@@ -187,6 +187,35 @@ final class EnrollmentTransitionServiceTest extends TestCase
]]));
}
public function testTargetEnrollmentReviewCodesIncludeWithdrawnRows(): void
{
$builder = $this->createMock(BaseBuilder::class);
$builder->method('select')->willReturnSelf();
$builder->method('where')->willReturnSelf();
$builder->method('orderBy')->willReturnSelf();
$builder->method('get')->willReturn(new class {
public function getResultArray(): array
{
return [[
'student_id' => 42,
'enrollment_status' => 'payment pending',
'admission_status' => 'accepted',
'is_withdrawn' => 1,
]];
}
});
$db = $this->createMock(BaseConnection::class);
$db->method('tableExists')->with('enrollments')->willReturn(true);
$db->method('fieldExists')->with('is_withdrawn', 'enrollments')->willReturn(true);
$db->method('table')->with('enrollments')->willReturn($builder);
$service = new EnrollmentTransitionService($db);
$reviewCodes = $this->invoke($service, 'targetEnrollmentReviewCodesByStudent', ['2026-2027']);
$this->assertSame('WITHDRAWN', $reviewCodes[42]['rule_code']);
}
/**
* @param list<array<string, mixed>> $rows
*/