1--TEST--
2FPM: Buffered message output log with limit 1024 and msg 80
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 = 1024
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('e', 80));
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('e', 1050, 80);
36$tester->expectLogMessage('NOTICE: PHP message: ' . str_repeat('e', 80), 1050);
37$tester->close();
38
39?>
40Done
41--EXPECT--
42Done
43--CLEAN--
44<?php
45require_once "tester.inc";
46FPM\Tester::clean();
47?>
48