1--TEST--
2FPM: Main invocation with prefix
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8require_once "tester.inc";
9
10$cfg = <<<EOT
11[global]
12error_log = {{RFILE:LOG:ERR}}
13pid = {{RFILE:PID}}
14[unconfined]
15listen = {{ADDR}}
16access.log = {{RFILE:LOG:ACC}}
17slowlog = {{RFILE:LOG:SLOW}}
18request_slowlog_timeout = 1
19ping.path = /ping
20ping.response = pong
21pm = dynamic
22pm.max_children = 5
23pm.start_servers = 2
24pm.min_spare_servers = 1
25pm.max_spare_servers = 3
26EOT;
27
28$prefix = __DIR__;
29$tester = new FPM\Tester($cfg);
30$tester->start(['--prefix', $prefix]);
31$tester->expectLogStartNotices();
32$tester->expectFile(FPM\Tester::FILE_EXT_LOG_ACC, $prefix);
33$tester->expectFile(FPM\Tester::FILE_EXT_LOG_ERR, $prefix);
34$tester->expectFile(FPM\Tester::FILE_EXT_LOG_SLOW, $prefix);
35$tester->expectFile(FPM\Tester::FILE_EXT_PID, $prefix);
36$tester->ping();
37$tester->terminate();
38$tester->expectLogTerminatingNotices();
39$tester->close();
40$tester->expectNoFile(FPM\Tester::FILE_EXT_PID, $prefix);
41
42?>
43Done
44--EXPECT--
45Done
46--CLEAN--
47<?php
48require_once "tester.inc";
49FPM\Tester::clean();
50?>
51