1--TEST--
2FPM: Buffered message output log with limit 2048 and msg 4000
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 = 2048
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
27error_log(str_repeat('t', 4000));
28EOT;
29
30$tester = new FPM\Tester($cfg, $code);
31$tester->start();
32$tester->expectLogStartNotices();
33$tester->request()->expectEmptyBody();
34$tester->terminate();
35$tester->expectFastCGIErrorMessage('t', 2048, 4000);
36$tester->expectLogMessage('NOTICE: PHP message: ' . str_repeat('t', 2023) . '...', 2048);
37$tester->close();
38
39?>
40Done
41--EXPECT--
42Done
43--CLEAN--
44<?php
45require_once "tester.inc";
46FPM\Tester::clean();
47?>
48