com php-src: Remove superfluous checks of always available functions: ext/filter/tests/033_run.inc ext/mbstring/tests/ove rload01.phpt
ext/mbstring/tests/overload02.phpt ext/openssl/tests/openssl_free_key.phpt ext/phar/tes ts/cache_list/files/phar_test.inc ext/phar/tests/files/
phar_test.inc ext/soap/tests/interop/Round2/Base/r2 _base_005p.phpt ext/soap/tests/interop/Round2/B ase/r2_base_005s.phpt ext/soap/tests/interop/Ro
und2/Base/r2_base_005w.phpt r

From: Date: Fri, 03 Aug 2018 03:13:01 +0000
Subject: com php-src: Remove superfluous checks of always available functions: ext/filter/tests/033_run.inc ext/mbstring/tests/ove rload01.phpt
ext/mbstring/tests/overload02.phpt ext/openssl/tests/openssl_free_key.phpt ext/phar/tes ts/cache_list/files/phar_test.inc ext/phar/tests/files/
phar_test.inc ext/soap/tests/interop/Round2/Base/r2 _base_005p.phpt ext/soap/tests/interop/Round2/B ase/r2_base_005s.phpt ext/soap/tests/interop/Ro
und2/Base/r2_base_005w.phpt r
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102791@lists.php.net to get a copy of this message
Commit: 0e0019f6940a252d5fa761b09e859a5d75b24545 Author: Gabriel Caruso <carusogabriel34@gmail.com> Fri, 3 Aug 2018 00:13:01 -0300 Parents: 7b184d320cf7224f77ace3b0ff3d78cb53b7fe68 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e0019f6940a252d5fa761b09e859a5d75b24545 Log: Remove superfluous checks of always available functions Changed paths: M ext/filter/tests/033_run.inc M ext/mbstring/tests/overload01.phpt M ext/mbstring/tests/overload02.phpt M ext/openssl/tests/openssl_free_key.phpt M ext/phar/tests/cache_list/files/phar_test.inc M ext/phar/tests/files/phar_test.inc M ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt M ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt M ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt M run-tests.php Diff: diff --git a/ext/filter/tests/033_run.inc b/ext/filter/tests/033_run.inc index ecb2cf7..30a7a82 100644 --- a/ext/filter/tests/033_run.inc +++ b/ext/filter/tests/033_run.inc @@ -1,7 +1,5 @@ <?php -if (function_exists('setlocale')) { - setlocale(LC_ALL, 'C'); -} +setlocale(LC_ALL, 'C'); function test($data) { return strtoupper($data); diff --git a/ext/mbstring/tests/overload01.phpt b/ext/mbstring/tests/overload01.phpt index 7efc65d..8950d91 100644 --- a/ext/mbstring/tests/overload01.phpt +++ b/ext/mbstring/tests/overload01.phpt @@ -3,9 +3,6 @@ Function overloading test 1 --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); - if (!function_exists("mail")) { - die('skip mail() function is not available.'); - } ?> --INI-- output_handler= diff --git a/ext/mbstring/tests/overload02.phpt b/ext/mbstring/tests/overload02.phpt index 48705b7..64b46df 100644 --- a/ext/mbstring/tests/overload02.phpt +++ b/ext/mbstring/tests/overload02.phpt @@ -3,9 +3,6 @@ Function overloading test 2 --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); - if (!function_exists("mail")) { - die('skip mail() function is not available.'); - } if (!function_exists("mb_ereg_replace")) { die('skip mb_ereg_replace() function is not available.'); } diff --git a/ext/openssl/tests/openssl_free_key.phpt b/ext/openssl/tests/openssl_free_key.phpt index ea79ce7..aa4a3a8 100644 --- a/ext/openssl/tests/openssl_free_key.phpt +++ b/ext/openssl/tests/openssl_free_key.phpt @@ -18,8 +18,7 @@ echo "Creating private key\n"; */ for ($z = "", $i = 0; $i < 1024; $i++) { $z .= $i * $i; - if (function_exists("usleep")) - usleep($i); + usleep($i); } $conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf'); diff --git a/ext/phar/tests/cache_list/files/phar_test.inc b/ext/phar/tests/cache_list/files/phar_test.inc index f82471d..047f4ea 100644 --- a/ext/phar/tests/cache_list/files/phar_test.inc +++ b/ext/phar/tests/cache_list/files/phar_test.inc @@ -1,8 +1,6 @@ <?php -if (function_exists('date_default_timezone_set')) { - date_default_timezone_set('UTC'); -} +date_default_timezone_set('UTC'); $manifest = (binary)''; $glags = 0; diff --git a/ext/phar/tests/files/phar_test.inc b/ext/phar/tests/files/phar_test.inc index 6f93969..6a75334 100644 --- a/ext/phar/tests/files/phar_test.inc +++ b/ext/phar/tests/files/phar_test.inc @@ -1,8 +1,6 @@ <?php -if (function_exists('date_default_timezone_set')) { - date_default_timezone_set('UTC'); -} +date_default_timezone_set('UTC'); $manifest = (binary)''; $gflags = 0; diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt index 22bab4e..d8f91d3 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt @@ -2,7 +2,6 @@ SOAP Interop Round2 base 005 (php/direct): echoString(utf-8) --SKIPIF-- <?php require_once('skipif.inc'); ?> -<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?> --FILE-- <?php $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt index f94c06f..116e14f 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt @@ -2,7 +2,6 @@ SOAP Interop Round2 base 005 (soap/direct): echoString(utf-8) --SKIPIF-- <?php require_once('skipif.inc'); ?> -<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?> --FILE-- <?php $client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0)); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt index 3bb1368..728b4f5 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt @@ -2,7 +2,6 @@ SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8) --SKIPIF-- <?php require_once('skipif.inc'); ?> -<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?> --INI-- soap.wsdl_cache_enabled=0 --FILE-- diff --git a/run-tests.php b/run-tests.php index c47770c..554f014 100644 --- a/run-tests.php +++ b/run-tests.php @@ -205,7 +205,7 @@ function verify_config() error('environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!'); } - if (function_exists('is_executable') && !is_executable($php)) { + if (!is_executable($php)) { error("invalid PHP executable specified by TEST_PHP_EXECUTABLE = $php"); } }

« previous php.cvs (#102791) next »