log-dwd-limit-1050-msg-2048.phpt 845 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. FPM: Direct worker output decorated log with limit 1050 with 2048 msg
  3. --SKIPIF--
  4. <?php include "skipif.inc"; ?>
  5. --FILE--
  6. <?php
  7. require_once "tester.inc";
  8. $cfg = <<<EOT
  9. [global]
  10. error_log = {{FILE:LOG}}
  11. log_limit = 1050
  12. log_buffering = no
  13. [unconfined]
  14. listen = {{ADDR}}
  15. pm = dynamic
  16. pm.max_children = 5
  17. pm.start_servers = 1
  18. pm.min_spare_servers = 1
  19. pm.max_spare_servers = 3
  20. catch_workers_output = yes
  21. decorate_workers_output = yes
  22. EOT;
  23. $code = <<<EOT
  24. <?php
  25. file_put_contents('php://stderr', str_repeat('a', 2048) . "\n");
  26. EOT;
  27. $tester = new FPM\Tester($cfg, $code);
  28. $tester->start();
  29. $tester->expectLogStartNotices();
  30. $tester->request()->expectEmptyBody();
  31. $tester->terminate();
  32. $tester->expectLogMessage('a', 1050, 2048);
  33. $tester->close();
  34. ?>
  35. Done
  36. --EXPECT--
  37. Done
  38. --CLEAN--
  39. <?php
  40. require_once "tester.inc";
  41. FPM\Tester::clean();
  42. ?>