insert([ [ 'id' => 1, 'title' => 'Parent', 'message' => 'Message', 'target_group' => 'parent', 'delivery_channels' => json_encode(['in_app']), 'scheduled_at' => now()->subHour(), 'expires_at' => now()->addHour(), 'created_at' => now(), 'updated_at' => now(), ], [ 'id' => 2, 'title' => 'Teacher', 'message' => 'Message', 'target_group' => 'teacher', 'delivery_channels' => json_encode(['in_app']), 'scheduled_at' => now()->subHour(), 'expires_at' => now()->addHour(), 'created_at' => now(), 'updated_at' => now(), ], ]); $service = new NotificationActiveService(); $result = $service->list('parent'); $this->assertCount(1, $result['notifications']); $this->assertFalse($result['notifications'][0]['isExpired']); } }