<?php
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '/CARGOO/';
$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['SCRIPT_NAME'] = '/CARGOO/index.php';

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

echo "HTML length: " . strlen($html) . "\n";
echo "Has cargoo-cat-2rows-grid: " . (strpos($html, 'cargoo-cat-2rows-grid') !== false ? 'YES' : 'NO') . "\n";
echo "Has catHeaderPrev: " . (strpos($html, 'id="catHeaderPrev"') !== false ? 'YES' : 'NO') . "\n";
echo "Has catHeaderNext: " . (strpos($html, 'id="catHeaderNext"') !== false ? 'YES' : 'NO') . "\n";
echo "Has catSidePrev: " . (strpos($html, 'id="catSidePrev"') !== false ? 'YES' : 'NO') . "\n";
echo "Has catSideNext: " . (strpos($html, 'id="catSideNext"') !== false ? 'YES' : 'NO') . "\n";
echo "Total category cards count: " . substr_count($html, 'class="cargoo-cat-card text-decoration-none"') . "\n";
