mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
New basic network function tests. Tested on Windows, Linux and Linux 64 bit
This commit is contained in:
parent
157453148a
commit
83b40961b7
18
ext/standard/tests/network/gethostbyaddr_basic1.phpt
Normal file
18
ext/standard/tests/network/gethostbyaddr_basic1.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Test gethostbyaddr() function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string gethostbyaddr ( string $ip_address )
|
||||
* Description: Get the Internet host name corresponding to a given IP address
|
||||
* Source code: ext/standard/dns.c
|
||||
*/
|
||||
|
||||
echo "*** Testing gethostbyaddr() : basic functionality ***\n";
|
||||
echo gethostbyaddr("127.0.0.1")."\n";
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing gethostbyaddr() : basic functionality ***
|
||||
%rloopback|localhost(\.localdomain)?%r
|
||||
===DONE===
|
18
ext/standard/tests/network/gethostbyname_basic003.phpt
Normal file
18
ext/standard/tests/network/gethostbyname_basic003.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Test gethostbyname() function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string gethostbyname ( string $hostname )
|
||||
* Description: Get the IPv4 address corresponding to a given Internet host name
|
||||
* Source code: ext/standard/dns.c
|
||||
*/
|
||||
|
||||
echo "*** Testing gethostbyname() : basic functionality ***\n";
|
||||
|
||||
echo gethostbyname("localhost")."\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
*** Testing gethostbyname() : basic functionality ***
|
||||
127.0.0.1
|
||||
===DONE===
|
19
ext/standard/tests/network/gethostbynamel_basic1.phpt
Normal file
19
ext/standard/tests/network/gethostbynamel_basic1.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Test gethostbynamel() function : basic functionality
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : array gethostbynamel ( string $hostname )
|
||||
* Description: Get a list of IPv4 addresses corresponding to a given Internet host name
|
||||
* Source code: ext/standard/dns.c
|
||||
*/
|
||||
|
||||
echo "*** Testing gethostbynamel() : basic functionality ***\n";
|
||||
var_dump(gethostbynamel("localhost"));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
*** Testing gethostbynamel() : basic functionality ***
|
||||
array(%d) {
|
||||
%a
|
||||
}
|
||||
===DONE===
|
Loading…
Reference in New Issue
Block a user