fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
+6 -6
View File
@@ -133,7 +133,7 @@ class AdditionalChargeTest extends TestCase
'created_by' => null,
]);
$model = new AdditionalCharge();
$model = new AdditionalCharge;
$result = $model->markApplied([$first->id, (string) $second->id], $invoiceId);
$this->assertTrue($result);
@@ -173,7 +173,7 @@ class AdditionalChargeTest extends TestCase
'created_by' => null,
]);
$paginator = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Spring', null, null, 50, true);
$paginator = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Spring', null, null, 50, true);
$this->assertSame(1, $paginator->total());
$first = $paginator->items()[0];
@@ -225,19 +225,19 @@ class AdditionalChargeTest extends TestCase
'created_by' => null,
]);
$paginator = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'Math', 50, true);
$paginator = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'Math', 50, true);
$this->assertSame(1, $paginator->total());
$this->assertSame('Math Club Fee', $paginator->items()[0]->title);
$byDescription = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'enrichment', 50, true);
$byDescription = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'enrichment', 50, true);
$this->assertSame(1, $byDescription->total());
$this->assertSame('Math Club Fee', $byDescription->items()[0]->title);
$byParentName = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'Hassan', 50, true);
$byParentName = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'Hassan', 50, true);
$this->assertSame(2, $byParentName->total());
$byInvoice = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'INV-2025-001', 50, true);
$byInvoice = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'INV-2025-001', 50, true);
$this->assertSame(2, $byInvoice->total());
}
}