1--TEST--
2FPM: bug64539 - status json format escaping
3--SKIPIF--
4<?php
5include "skipif.inc"; ?>
6--FILE--
7<?php
8
9require_once "tester.inc";
10
11$cfg = <<<EOT
12[global]
13error_log = {{FILE:LOG}}
14[unconfined]
15listen = {{ADDR}}
16pm = static
17pm.max_children = 2
18pm.status_path = /status
19catch_workers_output = yes
20EOT;
21
22$code = <<<EOT
23<?php
24usleep(200000);
25EOT;
26
27$tester = new FPM\Tester($cfg, $code);
28$tester->start();
29$tester->expectLogStartNotices();
30$responses = $tester
31    ->multiRequest([
32        ['query' => 'a=b"c'],
33        ['uri' => '/status', 'query' => 'full&json', 'delay' => 100000],
34    ]);
35$responses[1]->expectJsonBodyPatternForStatusProcessField('request uri', '\?a=b"c$');
36$tester->terminate();
37$tester->expectLogTerminatingNotices();
38$tester->close();
39
40?>
41Done
42--EXPECT--
43Done
44--CLEAN--
45<?php
46require_once "tester.inc";
47FPM\Tester::clean();
48?>
49