Skip to content

Commit 0e0019f

Browse files
committed
Remove superfluous checks of always available functions
1 parent 7b184d3 commit 0e0019f

File tree

10 files changed

+5
-21
lines changed

10 files changed

+5
-21
lines changed

ext/filter/tests/033_run.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
2-
if (function_exists('setlocale')) {
3-
setlocale(LC_ALL, 'C');
4-
}
2+
setlocale(LC_ALL, 'C');
53

64
function test($data) {
75
return strtoupper($data);

ext/mbstring/tests/overload01.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Function overloading test 1
33
--SKIPIF--
44
<?php
55
extension_loaded('mbstring') or die('skip mbstring not available');
6-
if (!function_exists("mail")) {
7-
die('skip mail() function is not available.');
8-
}
96
?>
107
--INI--
118
output_handler=

ext/mbstring/tests/overload02.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Function overloading test 2
33
--SKIPIF--
44
<?php
55
extension_loaded('mbstring') or die('skip mbstring not available');
6-
if (!function_exists("mail")) {
7-
die('skip mail() function is not available.');
8-
}
96
if (!function_exists("mb_ereg_replace")) {
107
die('skip mb_ereg_replace() function is not available.');
118
}

ext/openssl/tests/openssl_free_key.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ echo "Creating private key\n";
1818
*/
1919
for ($z = "", $i = 0; $i < 1024; $i++) {
2020
$z .= $i * $i;
21-
if (function_exists("usleep"))
22-
usleep($i);
21+
usleep($i);
2322
}
2423

2524
$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');

ext/phar/tests/cache_list/files/phar_test.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22

3-
if (function_exists('date_default_timezone_set')) {
4-
date_default_timezone_set('UTC');
5-
}
3+
date_default_timezone_set('UTC');
64

75
$manifest = (binary)'';
86
$glags = 0;

ext/phar/tests/files/phar_test.inc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22

3-
if (function_exists('date_default_timezone_set')) {
4-
date_default_timezone_set('UTC');
5-
}
3+
date_default_timezone_set('UTC');
64

75
$manifest = (binary)'';
86
$gflags = 0;

ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
SOAP Interop Round2 base 005 (php/direct): echoString(utf-8)
33
--SKIPIF--
44
<?php require_once('skipif.inc'); ?>
5-
<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
65
--FILE--
76
<?php
87
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));

ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
SOAP Interop Round2 base 005 (soap/direct): echoString(utf-8)
33
--SKIPIF--
44
<?php require_once('skipif.inc'); ?>
5-
<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
65
--FILE--
76
<?php
87
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));

ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8)
33
--SKIPIF--
44
<?php require_once('skipif.inc'); ?>
5-
<?php if (!function_exists('utf8_encode')) die('skip utf8_encode() not available'); ?>
65
--INI--
76
soap.wsdl_cache_enabled=0
87
--FILE--

run-tests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function verify_config()
205205
error('environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!');
206206
}
207207

208-
if (function_exists('is_executable') && !is_executable($php)) {
208+
if (!is_executable($php)) {
209209
error("invalid PHP executable specified by TEST_PHP_EXECUTABLE = $php");
210210
}
211211
}

0 commit comments

Comments
 (0)