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