logNotification(1, 'ABS_1', '2025-01-01', 'email', 'parent@example.com', 'Subject', 'sent'); $this->assertDatabaseHas('parent_notifications', [ 'student_id' => 1, 'code' => 'ABS_1', 'incident_date' => '2025-01-01 00:00:00', 'channel' => 'email', 'to_address' => 'parent@example.com', 'status' => 'sent', ]); $service->logNotification(1, 'ABS_1', '2025-01-01', 'email', 'parent@example.com', 'Updated', 'failed'); $row = DB::table('parent_notifications')->where('student_id', 1)->first(); $this->assertSame('Updated', $row->subject); $this->assertSame('failed', $row->status); } }