<?php
require_once __DIR__ . '/../../app/core/bootstrap.php';
$_SESSION['user_id'] = 1;
$_SESSION['user_role'] = 'admin';

ob_start();
include __DIR__ . '/index.php';
$html = ob_get_clean();

echo "Length: " . strlen($html) . "\n";
if (preg_match('/<span class="badge">(\d+)<\/span>/', $html, $m)) {
    echo "Badge count: " . $m[1] . "\n";
} else {
    echo "Badge not found\n";
}
