summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-08-03 00:13:01 -0300
committerGabriel Caruso <carusogabriel34@gmail.com>2018-08-03 00:13:01 -0300
commit0e0019f6940a252d5fa761b09e859a5d75b24545 (patch)
treedb1b81282c1c49d045ad441434793ee6cc74935b
parent7b184d320cf7224f77ace3b0ff3d78cb53b7fe68 (diff)
downloadphp-git-0e0019f6940a252d5fa761b09e859a5d75b24545.tar.gz
Remove superfluous checks of always available functions
-rw-r--r--ext/filter/tests/033_run.inc4
-rw-r--r--ext/mbstring/tests/overload01.phpt3
-rw-r--r--ext/mbstring/tests/overload02.phpt3
-rw-r--r--ext/openssl/tests/openssl_free_key.phpt3
-rw-r--r--ext/phar/tests/cache_list/files/phar_test.inc4
-rw-r--r--ext/phar/tests/files/phar_test.inc4
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt1
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt1
-rw-r--r--run-tests.php2
10 files changed, 5 insertions, 21 deletions
diff --git a/ext/filter/tests/033_run.inc b/ext/filter/tests/033_run.inc
index ecb2cf7be1..30a7a82a01 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 7efc65da82..8950d912fb 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 48705b782b..64b46dfd73 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 ea79ce703a..aa4a3a8a35 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 f82471d13b..047f4ea051 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 6f93969542..6a75334cdd 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 22bab4eae3..d8f91d328e 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 f94c06f58c..116e14faac 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 3bb1368b97..728b4f5c58 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 c47770ca06..554f014a25 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");
}
}