fix: render redirects in cli runtime

This commit is contained in:
Marek Miklewicz
2026-06-03 08:39:33 +02:00
parent 27d95e1baf
commit 0617798821
3 changed files with 32 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
require_once PLUGIN_ROOT . '/exec/lib/Http.php';
test('http redirect fallback renders visible html document for cli plugin runtime', function (): void {
$html = Http::redirectDocument('/CMD_PLUGINS/global-autoresponder/index.html?status=created');
assert_contains('<meta http-equiv="refresh"', $html);
assert_contains('window.location.replace', $html);
assert_contains('/CMD_PLUGINS/global-autoresponder/index.html?status=created', $html);
assert_contains('Przekierowanie', $html);
});