update tests
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user