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,47 @@
<?php
namespace Tests\Unit\Services\Invoices;
use App\Services\Invoices\InvoiceConfigService;
use App\Services\Invoices\InvoiceGenerationService;
use App\Services\Invoices\InvoiceGradeService;
use App\Services\Invoices\InvoiceManagementService;
use App\Services\Invoices\InvoiceService;
use App\Services\Invoices\InvoiceTuitionService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Mockery;
use Tests\TestCase;
class InvoiceServiceTest extends TestCase
{
use RefreshDatabase;
public function test_has_class_assignment_returns_true(): void
{
DB::table('students')->insert([
'id' => 1,
'parent_id' => 10,
'firstname' => 'Kid',
'lastname' => 'One',
'school_year' => '2025-2026',
]);
DB::table('student_class')->insert([
'id' => 1,
'student_id' => 1,
'class_section_id' => 101,
'school_year' => '2025-2026',
]);
$service = new InvoiceService(
Mockery::mock(InvoiceConfigService::class),
Mockery::mock(InvoiceManagementService::class),
Mockery::mock(InvoiceGenerationService::class),
Mockery::mock(InvoiceTuitionService::class),
Mockery::mock(InvoiceGradeService::class)
);
$this->assertTrue($service->hasClassAssignment('2025-2026', 10));
}
}