'zoomstage.online', 'New-Preland.example:8080' => 'new-preland.example', 'www.example.test.' => 'www.example.test', '' => 'fixture.local', ] as $host => $expected) { $html = shell_exec(PHP_BINARY . ' ' . escapeshellarg(__DIR__ . '/render-preland.php') . ' ' . escapeshellarg($host) . ' ' . escapeshellarg($theme) . ' ' . escapeshellarg($part) . ' ' . escapeshellarg($lang)); if (!preg_match('~~s', $html, $match)) throw new RuntimeException('Подвал не найден'); $footer = $match[0]; foreach (['Наши реквизиты', 'payment.svg', 'ИНН:', 'ОГРНИП:', 'ИП Иванов', 'ИП Кардаполова', 'Для бизнеса', '/public/api-pricing'] as $forbidden) { if (str_contains($footer, $forbidden)) throw new RuntimeException('В подвале остался ' . $forbidden); } if (!str_contains($footer, date('Y') . '© ' . $expected)) throw new RuntimeException('Неправильный домен копирайта: ' . $host); if (substr_count($footer, '')) throw new RuntimeException('Host попал в HTML без проверки'); } echo "OK: минимальный подвал, две темы, перенос домена/порт/trailing-dot и invalid-host\n";