socket-ipv6-any.phpt 749 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. FPM: Socket for IPv6 any address connection
  3. --SKIPIF--
  4. <?php
  5. include "skipif.inc";
  6. FPM\Tester::skipIfIPv6IsNotSupported();
  7. ?>
  8. --FILE--
  9. <?php
  10. require_once "tester.inc";
  11. $cfg = <<<EOT
  12. [global]
  13. error_log = {{FILE:LOG}}
  14. [unconfined]
  15. listen = {{ADDR:IPv6:ANY}}
  16. pm = dynamic
  17. pm.max_children = 5
  18. pm.start_servers = 2
  19. pm.min_spare_servers = 1
  20. pm.max_spare_servers = 3
  21. EOT;
  22. $tester = new FPM\Tester($cfg);
  23. $tester->start();
  24. $tester->expectLogStartNotices();
  25. $tester->checkConnection('127.0.0.1', 'IPv4: ok');
  26. $tester->checkConnection('[::1]', 'IPv6: ok');
  27. $tester->terminate();
  28. $tester->expectLogTerminatingNotices();
  29. $tester->close();
  30. ?>
  31. Done
  32. --EXPECT--
  33. IPv4: ok
  34. IPv6: ok
  35. Done
  36. --CLEAN--
  37. <?php
  38. require_once "tester.inc";
  39. FPM\Tester::clean();
  40. ?>