zoe Sun, 30 Aug 2009 08:18:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287892
Log: Fixed to allow for http etc Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/getservbyport_basic.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/getservbyport_basic.phpt U php/php-src/trunk/ext/standard/tests/general_functions/getservbyport_basic.phpt Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/getservbyport_basic.phpt =================================================================== --- php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/getservbyport_basic.phpt 2009-08-30 08:08:00 UTC (rev 287891) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/general_functions/getservbyport_basic.phpt 2009-08-30 08:18:53 UTC (rev 287892) @@ -13,10 +13,14 @@ else die(PHP_OS. " unsupported"); if(file_exists($file)){ - var_dump(getservbyport( 80, "tcp" ) === "www"); + $services = file_get_contents($file); + $service = getservbyport( 80, "tcp" ); + if(preg_match("/$service\s+80\/tcp/", $services)) { + echo "PASS\n"; + } }else{ - var_dump(getservbyport(80, "tcp") === false); + echo "Services file not found in expected location\n"; } ?> ---EXPECTF-- -bool(true) +--EXPECT-- +PASS Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/getservbyport_basic.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/getservbyport_basic.phpt 2009-08-30 08:08:00 UTC (rev 287891) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/general_functions/getservbyport_basic.phpt 2009-08-30 08:18:53 UTC (rev 287892) @@ -13,10 +13,14 @@ else die(PHP_OS. " unsupported"); if(file_exists($file)){ - var_dump(getservbyport( 80, "tcp" ) === "www"); + $services = file_get_contents($file); + $service = getservbyport( 80, "tcp" ); + if(preg_match("/$service\s+80\/tcp/", $services)) { + echo "PASS\n"; + } }else{ - var_dump(getservbyport(80, "tcp") === false); + echo "Services file not found in expected location\n"; } ?> ---EXPECTF-- -bool(true) +--EXPECT-- +PASS Modified: php/php-src/trunk/ext/standard/tests/general_functions/getservbyport_basic.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/general_functions/getservbyport_basic.phpt 2009-08-30 08:08:00 UTC (rev 287891) +++ php/php-src/trunk/ext/standard/tests/general_functions/getservbyport_basic.phpt 2009-08-30 08:18:53 UTC (rev 287892) @@ -13,10 +13,14 @@ else die(PHP_OS. " unsupported"); if(file_exists($file)){ - var_dump(getservbyport( 80, "tcp" ) === "www"); + $services = file_get_contents($file); + $service = getservbyport( 80, "tcp" ); + if(preg_match("/$service\s+80\/tcp/", $services)) { + echo "PASS\n"; + } }else{ - var_dump(getservbyport(80, "tcp") === false); + echo "Services file not found in expected location\n"; } ?> ---EXPECTF-- -bool(true) +--EXPECT-- +PASS
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php