Remove unnecessary CLI checks in tests

This commit is contained in:
Gabriel Caruso 2019-01-27 14:55:06 -02:00
parent cc60e8b000
commit 4e0dd6b0ed
23 changed files with 2 additions and 64 deletions

View File

@ -2,7 +2,6 @@
Bug #40236 (php -a function allocation eats memory)
--SKIPIF--
<?php
if (php_sapi_name() != "cli") die("skip CLI only");
if (extension_loaded("readline")) die("skip Test doesn't support readline");
?>
--FILE--

View File

@ -1,11 +1,5 @@
--TEST--
Bug #60978 (exit code incorrect)
--SKIPIF--
<?php
if ("cli" != php_sapi_name()) {
echo "skip CLI only";
}
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');

View File

@ -2,7 +2,6 @@
Bug #66218 zend_register_functions breaks reflection
--SKIPIF--
<?php
if (PHP_SAPI != "cli") die("skip CLI only test");
if (!function_exists("dl")) die("skip need dl");
?>
--FILE--

View File

@ -4,8 +4,6 @@ Constant scalar expressions with autoloading and classes
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
--FILE--
<?php

View File

@ -5,7 +5,7 @@ opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--SKIPIF--
<?php if (!extension_loaded('Zend OPcache') || php_sapi_name() != "cli") die("skip CLI only"); ?>
<?php if (!extension_loaded('Zend OPcache')) die("skip Zend OPcache extension not loaded"); ?>
--FILE--
<?php
printf ("A=%s\n", getA());

View File

@ -3,7 +3,7 @@ Bug #66338 (Optimization binding of class constants is not safely opcacheable)
--INI--
opcache.enable=0
--SKIPIF--
<?php if (!extension_loaded('Zend OPcache') || php_sapi_name() != "cli") die("skip CLI only"); ?>
<?php if (!extension_loaded('Zend OPcache')) die("skip Zend OPcache extension not loaded"); ?>
--FILE--
<?php
$root = str_replace('.php', "", __FILE__);

View File

@ -7,7 +7,6 @@ phar.readonly=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
--FILE--
<?php
$stub = '<?php

View File

@ -7,7 +7,6 @@ opcache.revalidate_freq=0
opcache.file_update_protection=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
<?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow tests excluded by request") ?>
--FILE--
<?php

View File

@ -7,7 +7,6 @@ phar.readonly=0
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
--FILE--
<?php
$stub = "<?php header('Content-Type: text/plain;');

View File

@ -6,7 +6,6 @@ opcache.enable_cli=1
opcache.revalidate_path=1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php if (php_sapi_name() != "cli") die("skip CLI only"); ?>
--FILE--
<?php
$dir = dirname(__FILE__);

View File

@ -2,7 +2,6 @@
ReflectionExtension::getFunctions() ##6218 zend_register_functions breaks reflection
--SKIPIF--
<?php
if (PHP_SAPI != "cli") die("skip CLI only test");
if (!function_exists("dl")) die("skip need dl");
?>
--FILE--

View File

@ -3,7 +3,6 @@ Bug #72035 php-cgi.exe fails to run scripts relative to drive root
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) die('skip windows only test');
if(php_sapi_name() != "cli") die('skip CLI only test');
$cgi = realpath(dirname(PHP_BINARY)) . DIRECTORY_SEPARATOR . "php-cgi.exe";
if (!file_exists($cgi)) die('skip CGI binary not found');

View File

@ -1,11 +1,5 @@
--TEST--
Bug #70018 (exec does not strip all whitespace)
--SKIPIF--
<?php
if ("cli" != php_sapi_name()) {
die("skip.. CLI only test");
}
?>
--FILE--
<?php
$output = array();

View File

@ -1,11 +1,5 @@
--TEST--
header() and friends
--SKIPIF--
<?php
if (php_sapi_name() != "cli") {
die("skip this test is for CLI");
}
?>
--FILE--
<?php

View File

@ -8,10 +8,6 @@ if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
die('skip: Only for Windows');
}
if (PHP_SAPI != 'cli') {
die('skip: Only for CLI');
}
if (getenv('SKIP_SLOW_TESTS')) {
doe('skip: Slow test');
}

View File

@ -2,7 +2,6 @@
proc_open with bypass_shell subprocess parameter passing
--SKIPIF--
<?php # vim:syn=php
if (php_sapi_name() != "cli") die('skip CLI only test');
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
--FILE--

View File

@ -2,7 +2,6 @@
proc_open without bypass_shell subprocess parameter passing
--SKIPIF--
<?php # vim:syn=php
if (php_sapi_name() != "cli") die('skip CLI only test');
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
--FILE--

View File

@ -3,11 +3,6 @@ cli_get_process_title() function : basic functionality
--CREDITS--
Patrick Allaert patrickallaert@php.net
@nephp #nephp17
--SKIPIF--
<?php
if (PHP_SAPI !== "cli")
die("skip");
?>
--FILE--
<?php
if (cli_set_process_title("title") && cli_get_process_title() === "title")

View File

@ -3,11 +3,6 @@ cli_get_process_title() function : error conditions
--CREDITS--
Patrick Allaert patrickallaert@php.net
@nephp #nephp17
--SKIPIF--
<?php
if (PHP_SAPI !== "cli")
die("skip");
?>
--FILE--
<?php
cli_get_process_title("foo");

View File

@ -3,11 +3,6 @@ cli_set_process_title() function : basic functionality
--CREDITS--
Patrick Allaert patrickallaert@php.net
@nephp #nephp17
--SKIPIF--
<?php
if (PHP_SAPI !== "cli")
die("skip");
?>
--FILE--
<?php
if (cli_set_process_title("title") === true &&

View File

@ -3,11 +3,6 @@ cli_set_process_title() function : error conditions
--CREDITS--
Patrick Allaert patrickallaert@php.net
@nephp #nephp17
--SKIPIF--
<?php
if (PHP_SAPI !== "cli")
die("skip");
?>
--FILE--
<?php
cli_set_process_title();

View File

@ -1,7 +1,5 @@
--TEST--
Testing $argc and $argv handling (cli)
--SKIPIF--
<?php if(php_sapi_name()!='cli') echo 'skip'; ?>
--INI--
register_argc_argv=1
variables_order=GPS

View File

@ -1,11 +1,5 @@
--TEST--
Bug #71273 A wrong ext directory setup in php.ini leads to crash
--SKIPIF--
<?php
if ("cli" != php_sapi_name()) {
die("skip CLI only");
}
?>
--FILE--
<?php
/* NOTE this file is required to be encoded in iso-8859-1 */