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,33 @@
<?php
namespace Tests\Unit\Services\Attendance;
use App\Models\LateSlipLog;
use App\Services\Attendance\LateSlipLogCommandService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class LateSlipLogCommandServiceTest extends TestCase
{
use RefreshDatabase;
public function test_delete_removes_log(): void
{
$log = LateSlipLog::query()->create([
'school_year' => '2025-2026',
'semester' => 'Fall',
'student_name' => 'Student X',
'slip_date' => '2025-09-01',
'time_in' => '08:05:00',
'grade' => '4',
'reason' => 'Traffic',
'admin_name' => 'Admin User',
]);
$service = app(LateSlipLogCommandService::class);
$deleted = $service->delete($log);
$this->assertTrue($deleted);
$this->assertDatabaseMissing('late_slip_logs', ['id' => $log->id]);
}
}