add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -10,7 +10,8 @@ class PaymentEnrollmentEventService
{
public function __construct(
private ApplicationUrlService $urls,
) {}
) {
}
public function buildEventData(
int $parentId,
@@ -28,7 +29,7 @@ class PaymentEnrollmentEventService
->where('id', $parentId)
->first();
if (! $parent) {
if (!$parent) {
throw new \RuntimeException("Parent user #{$parentId} not found");
}
@@ -103,7 +104,7 @@ class PaymentEnrollmentEventService
}
$seen[$sid] = true;
$teacherFull = trim(trim((string) ($row['t_firstname'] ?? '')).' '.trim((string) ($row['t_lastname'] ?? '')));
$teacherFull = trim(trim((string) ($row['t_firstname'] ?? '')) . ' ' . trim((string) ($row['t_lastname'] ?? '')));
$teacherFull = $teacherFull !== '' ? $teacherFull : null;
$students[] = [
@@ -111,7 +112,7 @@ class PaymentEnrollmentEventService
'student_id' => $sid,
'firstname' => (string) ($row['s_firstname'] ?? ''),
'lastname' => (string) ($row['s_lastname'] ?? ''),
'name' => trim(((string) ($row['s_firstname'] ?? '')).' '.((string) ($row['s_lastname'] ?? ''))),
'name' => trim(((string) ($row['s_firstname'] ?? '')) . ' ' . ((string) ($row['s_lastname'] ?? ''))),
'registration_grade' => (string) ($row['registration_grade'] ?? ''),
'class_section_id' => isset($row['class_section_id']) ? (int) $row['class_section_id'] : null,
'class_section_name' => $row['class_section_name'] ?? null,