1--TEST--
2FPM: Buffered worker output decorated log with limit 8000 with 4096 msg
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8require_once "tester.inc";
9
10$cfg = <<<EOT
11[global]
12error_log = {{FILE:LOG}}
13log_limit = 8000
14log_buffering = yes
15[unconfined]
16listen = {{ADDR}}
17pm = dynamic
18pm.max_children = 5
19pm.start_servers = 1
20pm.min_spare_servers = 1
21pm.max_spare_servers = 3
22catch_workers_output = yes
23EOT;
24
25$code = <<<EOT
26<?php
27file_put_contents('php://stderr', str_repeat('a', 4096) . "\n");
28EOT;
29
30$tester = new FPM\Tester($cfg, $code);
31$tester->start();
32$tester->expectLogStartNotices();
33$tester->request()->expectEmptyBody();
34$tester->terminate();
35$tester->expectLogMessage('a', 8000, 4096);
36$tester->close();
37
38?>
39Done
40--EXPECT--
41Done
42--CLEAN--
43<?php
44require_once "tester.inc";
45FPM\Tester::clean();
46?>
47