add controllers, servoices

This commit is contained in:
root
2026-03-09 02:52:13 -04:00
parent c8de5f7edc
commit d76c871cb7
501 changed files with 34439 additions and 21843 deletions
@@ -0,0 +1,37 @@
<?php
namespace Tests\Unit\Services\Finance;
use App\Services\Finance\FinancialChartService;
use App\Services\Finance\FinancialPdfReportService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class FinancialPdfReportServiceTest extends TestCase
{
use RefreshDatabase;
public function test_build_pdf_returns_bytes(): void
{
$service = new FinancialPdfReportService(new FinancialChartService());
$summary = [
'schoolYear' => '2025-2026',
'totalCharges' => 100,
'totalExtraCharges' => 20,
'totalDiscounts' => 10,
'totalRefunds' => 5,
'totalExpenses' => 15,
'totalReimbursements' => 8,
'donationToSchool' => 3,
'netAmount' => 85,
'amountCollected' => 60,
'totalUnpaid' => 40,
];
$pdf = $service->buildPdf($summary);
$this->assertIsString($pdf);
$this->assertNotSame('', $pdf);
}
}