diff --git a/tests/Feature/Api/V1/AttendanceTracking/AttendanceTrackingControllerTest.php b/tests/Feature/Api/V1/AttendanceTracking/AttendanceTrackingControllerTest.php index 37e92e9b..007e1de2 100644 --- a/tests/Feature/Api/V1/AttendanceTracking/AttendanceTrackingControllerTest.php +++ b/tests/Feature/Api/V1/AttendanceTracking/AttendanceTrackingControllerTest.php @@ -20,12 +20,19 @@ class AttendanceTrackingControllerTest extends TestCase { parent::setUp(); - // Bind the AttendanceMailerService interface to a mock so the - // controller can be instantiated during route middleware gathering + // Bind the AttendanceMailerService interface to a no-op implementation + // so the controller can be instantiated during route middleware gathering // even when the full service chain is not mocked. $this->app->instance( AttendanceMailerService::class, - Mockery::mock(AttendanceMailerService::class) + new class implements AttendanceMailerService { + public function send(string $to, string $subject, string $html): bool + { + return true; + } + + public function queueAttendanceEvent(array $payload): void {} + } ); }