update tests

This commit is contained in:
root
2026-06-08 22:06:30 -04:00
parent 79024235ef
commit 60ecacb7f8
54 changed files with 13243 additions and 5561 deletions
@@ -2,6 +2,7 @@
namespace Tests\Unit\Services\Payments;
use App\Services\ApplicationUrlService;
use App\Services\Payments\PaymentEnrollmentEventService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
@@ -11,9 +12,14 @@ class PaymentEnrollmentEventServiceTest extends TestCase
{
use RefreshDatabase;
private function makeService(): PaymentEnrollmentEventService
{
return new PaymentEnrollmentEventService(new ApplicationUrlService());
}
public function test_build_event_data_requires_parent(): void
{
$service = new PaymentEnrollmentEventService();
$service = $this->makeService();
$this->expectException(\RuntimeException::class);
@@ -43,7 +49,7 @@ class PaymentEnrollmentEventServiceTest extends TestCase
'school_year' => '2025-2026',
]);
$service = new PaymentEnrollmentEventService();
$service = $this->makeService();
[$parent, $students] = $service->buildEventData(10, [], '2025-2026', 'Fall', 'https://example.test/login');
$this->assertSame(10, $parent['user_id']);