1--TEST-- 2FPM: Log message in shutdown function 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 27register_shutdown_function(function() { 28 error_log(str_repeat('e', 80)); 29}); 30EOT; 31 32$tester = new FPM\Tester($cfg, $code); 33$tester->start(); 34$tester->expectLogStartNotices(); 35$tester->request()->expectEmptyBody(); 36$tester->terminate(); 37$tester->expectFastCGIErrorMessage('e', 1050, 80); 38$tester->expectLogMessage('NOTICE: PHP message: ' . str_repeat('e', 80), 1050); 39$tester->close(); 40 41?> 42Done 43--EXPECT-- 44Done 45--CLEAN-- 46<?php 47require_once "tester.inc"; 48FPM\Tester::clean(); 49?> 50