php-8.0.30-src/sapi/fpm/tests/socket-ipv6-any.phpt

45 lines
749 B
PHP

--TEST--
FPM: Socket for IPv6 any address connection
--SKIPIF--
<?php
include "skipif.inc";
FPM\Tester::skipIfIPv6IsNotSupported();
?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR:IPv6:ANY}}
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
EOT;
$tester = new FPM\Tester($cfg);
$tester->start();
$tester->expectLogStartNotices();
$tester->checkConnection('127.0.0.1', 'IPv4: ok');
$tester->checkConnection('[::1]', 'IPv6: ok');
$tester->terminate();
$tester->expectLogTerminatingNotices();
$tester->close();
?>
Done
--EXPECT--
IPv4: ok
IPv6: ok
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>