add refund and event logic

This commit is contained in:
root
2026-03-10 23:12:49 -04:00
parent ba1206e314
commit f6be51576c
67 changed files with 4808 additions and 1000 deletions
@@ -0,0 +1,34 @@
<?php
namespace Tests\Unit\Services\Events;
use App\Services\Events\EventChargeQueryService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class EventChargeQueryServiceTest extends TestCase
{
use RefreshDatabase;
public function test_list_returns_paginated_charges(): void
{
DB::table('event_charges')->insert([
'id' => 1,
'event_id' => 1,
'parent_id' => 10,
'student_id' => 1,
'participation' => 'yes',
'charged' => 10,
'school_year' => '2025-2026',
'semester' => 'Fall',
'created_at' => now(),
'updated_at' => now(),
]);
$service = new EventChargeQueryService();
$result = $service->list(['per_page' => 10, 'page' => 1]);
$this->assertSame(1, $result['pagination']['total']);
}
}