2012-06-30 05:39:22 +02:00
|
|
|
--TEST--
|
2012-07-06 16:41:59 +02:00
|
|
|
Check for ares_getaddrinfo
|
2016-11-01 18:26:28 +01:00
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (getenv("SKIP_ONLINE_TESTS")) {
|
|
|
|
die("skip test requiring internet connection\n");
|
|
|
|
}
|
|
|
|
?>
|
2012-06-30 05:39:22 +02:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2015-01-18 02:58:40 +01:00
|
|
|
uv_getaddrinfo(uv_default_loop(), function($status, $names) {
|
2012-06-30 05:39:22 +02:00
|
|
|
echo "status: " . $status . PHP_EOL;
|
|
|
|
if (is_array($names)) {
|
|
|
|
echo "OK" . PHP_EOL;
|
|
|
|
} else {
|
|
|
|
echo "FAILED: 2nd parameter does not array" . PHP_EOL;
|
|
|
|
}
|
2015-01-18 02:58:40 +01:00
|
|
|
},"php.net", NULL, array(
|
2012-06-30 05:39:22 +02:00
|
|
|
"ai_family" => UV::AF_UNSPEC
|
|
|
|
));
|
|
|
|
|
2015-01-18 02:58:40 +01:00
|
|
|
uv_getaddrinfo(uv_default_loop(), function($status, $names) {
|
2012-06-30 05:39:22 +02:00
|
|
|
echo "status: " . $status . PHP_EOL;
|
|
|
|
if (is_array($names)) {
|
|
|
|
echo "OK" . PHP_EOL;
|
|
|
|
} else {
|
|
|
|
echo "FAILED: 2nd parameter does not array" . PHP_EOL;
|
|
|
|
}
|
2015-01-18 02:58:40 +01:00
|
|
|
},"php.net", NULL, array(
|
2012-06-30 05:39:22 +02:00
|
|
|
"ai_family" => UV::AF_UNSPEC
|
|
|
|
));
|
|
|
|
|
|
|
|
uv_run();
|
|
|
|
--EXPECT--
|
|
|
|
status: 0
|
|
|
|
OK
|
|
|
|
status: 0
|
2015-01-18 02:58:40 +01:00
|
|
|
OK
|