35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\Services\AttendanceTracking;
|
|
|
|
use App\Models\AttendanceData;
|
|
use App\Models\AttendanceTracking;
|
|
use App\Models\Student;
|
|
use App\Services\AttendanceTracking\AttendanceCaseQueryService;
|
|
use App\Services\AttendanceTracking\AttendanceParentLookupService;
|
|
use App\Services\AttendanceTracking\ViolationRuleEngineService;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Mockery;
|
|
use Tests\TestCase;
|
|
|
|
class AttendanceCaseQueryServiceTest extends TestCase
|
|
{
|
|
use RefreshDatabase;
|
|
|
|
public function test_returns_not_found_when_student_missing(): void
|
|
{
|
|
$service = new AttendanceCaseQueryService(
|
|
new Student,
|
|
new AttendanceData,
|
|
new AttendanceTracking,
|
|
Mockery::mock(ViolationRuleEngineService::class),
|
|
Mockery::mock(AttendanceParentLookupService::class)
|
|
);
|
|
|
|
$result = $service->getStudentCase(999);
|
|
|
|
$this->assertFalse($result['success']);
|
|
$this->assertSame(404, $result['status']);
|
|
}
|
|
}
|