add all controllers logic

This commit is contained in:
root
2026-03-11 17:53:15 -04:00
parent 3e6c577085
commit 2ef71cc92b
421 changed files with 12009 additions and 5211 deletions
@@ -0,0 +1,37 @@
<?php
namespace Tests\Unit\Services\Attendance;
use App\Services\Attendance\LateSlipLogQueryService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class LateSlipLogQueryServiceTest extends TestCase
{
use RefreshDatabase;
public function test_paginate_filters_by_date(): void
{
DB::table('late_slip_logs')->insert([
[
'school_year' => '2025-2026',
'semester' => 'Fall',
'student_name' => 'Student A',
'slip_date' => '2025-09-01',
],
[
'school_year' => '2025-2026',
'semester' => 'Fall',
'student_name' => 'Student B',
'slip_date' => '2025-10-01',
],
]);
$service = app(LateSlipLogQueryService::class);
$pager = $service->paginate(['date_from' => '2025-10-01'], 1, 10);
$this->assertSame(1, $pager->total());
$this->assertSame('Student B', $pager->items()[0]->student_name);
}
}