1--TEST--
2FPM: bug77106 - Missing new lines in FCGI error stream
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}}
13[unconfined]
14listen = {{ADDR}}
15pm = dynamic
16pm.max_children = 5
17pm.start_servers = 1
18pm.min_spare_servers = 1
19pm.max_spare_servers = 3
20php_admin_flag[log_errors] = 1
21EOT;
22
23$code = <<<EOT
24<?php
25echo \$a;
26echo \$a;
27EOT;
28
29$tester = new FPM\Tester($cfg, $code);
30$tester->start();
31$tester->expectLogStartNotices();
32$tester->request()->expectErrorPattern(
33    '/Undefined variable \$a in .+ on line \d+; PHP message: PHP Warning:/'
34);
35$tester->terminate();
36$tester->close();
37
38?>
39Done
40--EXPECT--
41Done
42--CLEAN--
43<?php
44require_once "tester.inc";
45FPM\Tester::clean();
46?>
47