shouldReceive('hasSent') ->once() ->with(10, 'ABS_1', '2026-03-01', 'email', 'parent@example.com') ->andReturn(true); $service = new AttendanceNotificationLogService($model); $this->assertTrue( $service->notificationAlreadySent(10, 'ABS_1', '2026-03-01', 'email', 'parent@example.com') ); } public function test_notification_already_sent_returns_false_when_model_has_sent_returns_false(): void { $model = Mockery::mock(ParentNotification::class); $model->shouldReceive('hasSent') ->once() ->andReturn(false); $service = new AttendanceNotificationLogService($model); $this->assertFalse( $service->notificationAlreadySent(10, 'ABS_1', '2026-03-01', 'email', 'parent@example.com') ); } }