Merge branch 'PHP-5.4'

* PHP-5.4:
  add news for --offline
  add --offline option to run-tests command
  Bug #63147: SKIP_ONLINE_TESTS, for getmxrr
  Bug #63147: introduce SKIP_ONLINE_TESTS, for gethostbyname
  gethostbyname_basic002.phpt is a duplicate to gethostbyname_error004.phpt
This commit is contained in:
Stanislav Malyshev 2012-09-30 19:41:54 -07:00
commit 4ba2d546c8
5 changed files with 8 additions and 15 deletions

View File

@ -5,6 +5,7 @@ gethostbyname() function - basic type return test
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (getenv("SKIP_ONLINE_TESTS")) die("skip test requiring internet connection");
?>
--FILE--
<?php

View File

@ -1,15 +0,0 @@
--TEST--
gethostbyname() function - basic invalid parameter test
--CREDITS--
"Sylvain R." <sracine@phpquebec.org>
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--
<?php
$ip = gethostbyname("www.php.net");
var_dump((bool) ip2long($ip));
?>
--EXPECT--
bool(true)

View File

@ -5,6 +5,7 @@ gethostbyname() function - basic return valid ip address test
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (getenv("SKIP_ONLINE_TESTS")) die("skip test requiring internet connection");
?>
--FILE--
<?php

View File

@ -3,6 +3,7 @@ getmxrr() test
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (getenv("SKIP_ONLINE_TESTS")) die("skip test requiring internet connection");
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip: no Windows support');
}

View File

@ -635,6 +635,9 @@ if (isset($argc) && $argc > 1) {
case 'x':
$environment['SKIP_SLOW_TESTS'] = 1;
break;
case '--offline':
$environment['SKIP_ONLINE_TESTS'] = 1;
break;
//case 'w'
case '-':
// repeat check with full switch
@ -692,6 +695,8 @@ Options:
-x Sets 'SKIP_SLOW_TESTS' environmental variable.
--offline Sets 'SKIP_ONLINE_TESTS' environmental variable.
--verbose
-v Verbose mode.