mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
add uv_ip test cases
This commit is contained in:
parent
3276e0abf8
commit
deec04d4c2
7
tests/010-uv_ip4_addr.phpt
Normal file
7
tests/010-uv_ip4_addr.phpt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--TEST--
|
||||||
|
Check for uv_ip4_addr
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
var_dump(uv_ip4_addr("0.0.0.0",0));
|
||||||
|
--EXPECT--
|
||||||
|
resource(4) of type (uv_sockaddr)
|
9
tests/010-uv_ip4_name.phpt
Normal file
9
tests/010-uv_ip4_name.phpt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
--TEST--
|
||||||
|
Check for uv_ip4_name
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
$ip = uv_ip4_addr("0.0.0.0",0);
|
||||||
|
$info = uv_ip4_name($ip);
|
||||||
|
echo $info . PHP_EOL;
|
||||||
|
--EXPECT--
|
||||||
|
0.0.0.0
|
7
tests/010-uv_ip6_addr.phpt
Normal file
7
tests/010-uv_ip6_addr.phpt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--TEST--
|
||||||
|
Check for uv_ip6_addr
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
var_dump(uv_ip6_addr("::0",0));
|
||||||
|
--EXPECT--
|
||||||
|
resource(4) of type (uv_sockaddr)
|
8
tests/010-uv_ip6_name.phpt
Normal file
8
tests/010-uv_ip6_name.phpt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
--TEST--
|
||||||
|
Check for uv_ip6_name
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
$ip = uv_ip6_addr("::1",0);
|
||||||
|
echo uv_ip6_name($ip) . PHP_EOL;
|
||||||
|
--EXPECT--
|
||||||
|
::1
|
Loading…
Reference in New Issue
Block a user