fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -27,7 +27,7 @@ class PaymentBalanceServiceTest extends TestCase
'status' => 'Pending',
]);
$service = new PaymentBalanceService;
$service = new PaymentBalanceService();
$updated = $service->updateBalance(1, 40);
$this->assertTrue($updated);
@@ -14,7 +14,7 @@ class PaymentEnrollmentEventServiceTest extends TestCase
private function makeService(): PaymentEnrollmentEventService
{
return new PaymentEnrollmentEventService(new ApplicationUrlService);
return new PaymentEnrollmentEventService(new ApplicationUrlService());
}
public function test_build_event_data_requires_parent(): void
@@ -41,7 +41,7 @@ class PaymentLookupServiceTest extends TestCase
'status' => 'Pending',
]);
$service = new PaymentLookupService;
$service = new PaymentLookupService();
$results = $service->getByParent(10, '2025-2026');
$this->assertCount(1, $results);
@@ -18,7 +18,7 @@ class PaymentNotificationDispatchServiceTest extends TestCase
['id' => 2002, 'config_key' => 'semester', 'config_value' => 'Fall'],
]);
$service = new PaymentNotificationDispatchService;
$service = new PaymentNotificationDispatchService();
$service->notifyUser(10, 'Payment Reminder', 'Reminder body', ['in_app']);
$this->assertDatabaseHas('notifications', [
@@ -53,7 +53,7 @@ class PaymentPlanServiceTest extends TestCase
'semester' => 'Fall',
]);
$service = new PaymentPlanService;
$service = new PaymentPlanService();
$payment = $service->createPlan([
'parent_id' => 10,
'invoice_id' => 1,
@@ -3,8 +3,8 @@
namespace Tests\Unit\Services\Payments;
use App\Services\Payments\PaymentTransactionService;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Tests\TestCase;
@@ -15,13 +15,13 @@ class PaymentTransactionServiceTest extends TestCase
public function test_create_and_update_transaction(): void
{
if (! Schema::hasColumn('payment_transactions', 'payment_reference')) {
if (!Schema::hasColumn('payment_transactions', 'payment_reference')) {
Schema::table('payment_transactions', function (Blueprint $table) {
$table->string('payment_reference')->nullable();
});
}
if (! Schema::hasColumn('payment_transactions', 'is_full_payment')) {
if (!Schema::hasColumn('payment_transactions', 'is_full_payment')) {
Schema::table('payment_transactions', function (Blueprint $table) {
$table->boolean('is_full_payment')->default(0);
});
@@ -41,7 +41,7 @@ class PaymentTransactionServiceTest extends TestCase
'status' => 'Pending',
]);
$service = new PaymentTransactionService;
$service = new PaymentTransactionService();
$transaction = $service->create([
'transaction_id' => 'TXN-1',
'payment_id' => 1,
@@ -14,7 +14,7 @@ class PaypalPaymentServiceTest extends TestCase
private function makeService(): PaypalPaymentService
{
return new PaypalPaymentService(new ApplicationUrlService);
return new PaypalPaymentService(new ApplicationUrlService());
}
public function test_create_payment_falls_back_to_hosted_when_sdk_missing(): void
@@ -37,7 +37,7 @@ class PaypalTransactionsServiceTest extends TestCase
'created_at' => '2025-01-02 00:00:00',
]);
$service = new PaypalTransactionsService;
$service = new PaypalTransactionsService();
$results = $service->listAll('ABC');
$this->assertCount(1, $results);