<?php
require 'src/Utils/Auth.php';
require 'src/Config/Database.php';
require 'src/Controllers/DashboardController.php';

// Mock session and GET
$_SESSION['user'] = [
    'id' => 1,
    'tenant_id' => 1,
    'role' => 'admin',
    'branch_id' => null
];
$_GET['branch_id'] = 'all';
$_GET['search'] = 'tenormin';
$_GET['page'] = '1';

// We need to bypass Auth::requireLogin since it checks $_SESSION
session_start();
$_SESSION['user'] = [
    'id' => 1,
    'tenant_id' => 1,
    'role' => 'admin',
    'branch_id' => null
];

$controller = new \App\Controllers\DashboardController();
ob_start();
$controller->expiredItems();
$output = ob_get_clean();

echo "Output:\n" . $output;
