1--TEST--
2FPM: bug75212 - php_value acts like php_admin_value
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_value[memory_limit]=32M
21php_value[date.timezone]=Europe/London
22EOT;
23
24$code = <<<EOT
25<?php
26echo "Test Start\n";
27var_dump(ini_get('memory_limit'), ini_get('date.timezone'));
28echo "Test End\n";
29EOT;
30
31$ini = <<<EOT
32memory_limit=64M
33date.timezone=Europe/Paris
34EOT;
35
36$tester = new FPM\Tester($cfg, $code);
37$tester->setUserIni($ini);
38$tester->start();
39$tester->expectLogStartNotices();
40$tester->request()->expectBody([
41    'Test Start',
42    'string(3) "32M"',
43    'string(12) "Europe/Paris"',
44    'Test End'
45]);
46$tester->terminate();
47$tester->close();
48
49?>
50Done
51--EXPECT--
52Done
53--CLEAN--
54<?php
55require_once "tester.inc";
56FPM\Tester::clean();
57?>
58