1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/sapi/fpm/tests/bug64539-status-json-encoding.phpt
T
Jakub Zelenka aa061cd40b Fix FPM status json encoded value test
Closes GH-11276
2023-05-19 16:20:21 +01:00

49 lines
853 B
PHP

--TEST--
FPM: bug64539 - status json format escaping
--SKIPIF--
<?php
include "skipif.inc"; ?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR}}
pm = static
pm.max_children = 2
pm.status_path = /status
catch_workers_output = yes
EOT;
$code = <<<EOT
<?php
usleep(200000);
EOT;
$tester = new FPM\Tester($cfg, $code);
$tester->start();
$tester->expectLogStartNotices();
$responses = $tester
->multiRequest([
['query' => 'a=b"c'],
['uri' => '/status', 'query' => 'full&json', 'delay' => 100000],
]);
$responses[1]->expectJsonBodyPatternForStatusProcessField('request uri', '\?a=b"c$');
$tester->terminate();
$tester->expectLogTerminatingNotices();
$tester->close();
?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>