com php-src: Remove unnecessary CLI checks in tests: Zend/tests/bug40236.phpt Zend/tests/bug60978.phpt Zend/tests/bug66218.phpt
Zend/tests/constant_expressions_classes.phpt ext/opcach e/tests/bug66251.phpt ext/opcache/tests/bug66 338.phpt ext/opcache/tests/issue0115.phpt
ext/opcache/tests/issue0140.phpt ext/opcache/tes ts/issue0149.phpt ext/opcache/tests/revalidate_pa th_01.phpt ext/reflection/tests/ReflectionExtension
_bug66218.phpt ext/standard/test

From: Date: Thu, 31 Jan 2019 02:21:32 +0000
Subject: com php-src: Remove unnecessary CLI checks in tests: Zend/tests/bug40236.phpt Zend/tests/bug60978.phpt Zend/tests/bug66218.phpt
Zend/tests/constant_expressions_classes.phpt ext/opcach e/tests/bug66251.phpt ext/opcache/tests/bug66 338.phpt ext/opcache/tests/issue0115.phpt
ext/opcache/tests/issue0140.phpt ext/opcache/tes ts/issue0149.phpt ext/opcache/tests/revalidate_pa th_01.phpt ext/reflection/tests/ReflectionExtension
_bug66218.phpt ext/standard/test
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104412@lists.php.net to get a copy of this message
Commit: 4e0dd6b0edb2aaaa62efcfbd94a7fb0276d9b013 Author: Gabriel Caruso <carusogabriel34@gmail.com> Sun, 27 Jan 2019 14:55:06 -0200 Parents: cc60e8b00033cf9ae0b6dec44d7ed8505bf0eb13 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4e0dd6b0edb2aaaa62efcfbd94a7fb0276d9b013 Log: Remove unnecessary CLI checks in tests Changed paths: M Zend/tests/bug40236.phpt M Zend/tests/bug60978.phpt M Zend/tests/bug66218.phpt M Zend/tests/constant_expressions_classes.phpt M ext/opcache/tests/bug66251.phpt M ext/opcache/tests/bug66338.phpt M ext/opcache/tests/issue0115.phpt M ext/opcache/tests/issue0140.phpt M ext/opcache/tests/issue0149.phpt M ext/opcache/tests/revalidate_path_01.phpt M ext/reflection/tests/ReflectionExtension_bug66218.phpt M ext/standard/tests/file/bug72035.phpt M ext/standard/tests/general_functions/bug70018.phpt M ext/standard/tests/general_functions/head.phpt M ext/standard/tests/general_functions/proc_nice_basic-win.phpt M ext/standard/tests/general_functions/proc_open-mb0.phpt M ext/standard/tests/general_functions/proc_open-mb1.phpt M sapi/cli/tests/cli_get_process_title_basic.phpt M sapi/cli/tests/cli_get_process_title_error.phpt M sapi/cli/tests/cli_set_process_title_basic.phpt M sapi/cli/tests/cli_set_process_title_error.phpt M tests/basic/012.phpt M tests/basic/bug71273.phpt

diff --git a/Zend/tests/bug40236.phpt b/Zend/tests/bug40236.phpt index f9a4277..5a86ba4 100644 --- a/Zend/tests/bug40236.phpt +++ b/Zend/tests/bug40236.phpt @@ -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-- diff --git a/Zend/tests/bug60978.phpt b/Zend/tests/bug60978.phpt index 676808c..5dc6fe3 100644 --- a/Zend/tests/bug60978.phpt +++ b/Zend/tests/bug60978.phpt @@ -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'); diff --git a/Zend/tests/bug66218.phpt b/Zend/tests/bug66218.phpt index d800605..db3c7c6 100644 --- a/Zend/tests/bug66218.phpt +++ b/Zend/tests/bug66218.phpt @@ -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-- diff --git a/Zend/tests/constant_expressions_classes.phpt b/Zend/tests/constant_expressions_classes.phpt index eed006b..89cabc0 100644 --- a/Zend/tests/constant_expressions_classes.phpt +++ b/Zend/tests/constant_expressions_classes.phpt @@ -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 diff --git a/ext/opcache/tests/bug66251.phpt b/ext/opcache/tests/bug66251.phpt index daa5a89..64e7580 100644 --- a/ext/opcache/tests/bug66251.phpt +++ b/ext/opcache/tests/bug66251.phpt @@ -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()); diff --git a/ext/opcache/tests/bug66338.phpt b/ext/opcache/tests/bug66338.phpt index 8b30391..676af19 100644 --- a/ext/opcache/tests/bug66338.phpt +++ b/ext/opcache/tests/bug66338.phpt @@ -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__); diff --git a/ext/opcache/tests/issue0115.phpt b/ext/opcache/tests/issue0115.phpt index 26d9908..c538a25 100644 --- a/ext/opcache/tests/issue0115.phpt +++ b/ext/opcache/tests/issue0115.phpt @@ -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 diff --git a/ext/opcache/tests/issue0140.phpt b/ext/opcache/tests/issue0140.phpt index 97fc11b..c22898e 100644 --- a/ext/opcache/tests/issue0140.phpt +++ b/ext/opcache/tests/issue0140.phpt @@ -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 diff --git a/ext/opcache/tests/issue0149.phpt b/ext/opcache/tests/issue0149.phpt index ba57623..31a8049 100644 --- a/ext/opcache/tests/issue0149.phpt +++ b/ext/opcache/tests/issue0149.phpt @@ -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;'); diff --git a/ext/opcache/tests/revalidate_path_01.phpt b/ext/opcache/tests/revalidate_path_01.phpt index 8261633..79936b6 100644 --- a/ext/opcache/tests/revalidate_path_01.phpt +++ b/ext/opcache/tests/revalidate_path_01.phpt @@ -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__); diff --git a/ext/reflection/tests/ReflectionExtension_bug66218.phpt b/ext/reflection/tests/ReflectionExtension_bug66218.phpt index 77f3d23..f42967c 100644 --- a/ext/reflection/tests/ReflectionExtension_bug66218.phpt +++ b/ext/reflection/tests/ReflectionExtension_bug66218.phpt @@ -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-- diff --git a/ext/standard/tests/file/bug72035.phpt b/ext/standard/tests/file/bug72035.phpt index feb4eb9..eb784f7 100644 --- a/ext/standard/tests/file/bug72035.phpt +++ b/ext/standard/tests/file/bug72035.phpt @@ -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'); diff --git a/ext/standard/tests/general_functions/bug70018.phpt b/ext/standard/tests/general_functions/bug70018.phpt index d4c38b9..43139fc 100644 --- a/ext/standard/tests/general_functions/bug70018.phpt +++ b/ext/standard/tests/general_functions/bug70018.phpt @@ -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(); diff --git a/ext/standard/tests/general_functions/head.phpt b/ext/standard/tests/general_functions/head.phpt index 059c56b..f8d4c28 100644 --- a/ext/standard/tests/general_functions/head.phpt +++ b/ext/standard/tests/general_functions/head.phpt @@ -1,11 +1,5 @@ --TEST-- header() and friends ---SKIPIF-- -<?php -if (php_sapi_name() != "cli") { - die("skip this test is for CLI"); -} -?> --FILE-- <?php diff --git a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt index 87a4545..37f8e17 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt @@ -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'); } diff --git a/ext/standard/tests/general_functions/proc_open-mb0.phpt b/ext/standard/tests/general_functions/proc_open-mb0.phpt index 9f4eef5..f19a9fb 100644 --- a/ext/standard/tests/general_functions/proc_open-mb0.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb0.phpt @@ -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-- diff --git a/ext/standard/tests/general_functions/proc_open-mb1.phpt b/ext/standard/tests/general_functions/proc_open-mb1.phpt index 7787b7a..666779d 100644 --- a/ext/standard/tests/general_functions/proc_open-mb1.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb1.phpt @@ -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-- diff --git a/sapi/cli/tests/cli_get_process_title_basic.phpt b/sapi/cli/tests/cli_get_process_title_basic.phpt index 66d1d4f..791f75b 100644 --- a/sapi/cli/tests/cli_get_process_title_basic.phpt +++ b/sapi/cli/tests/cli_get_process_title_basic.phpt @@ -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") diff --git a/sapi/cli/tests/cli_get_process_title_error.phpt b/sapi/cli/tests/cli_get_process_title_error.phpt index 67274db..bbfdfc2 100644 --- a/sapi/cli/tests/cli_get_process_title_error.phpt +++ b/sapi/cli/tests/cli_get_process_title_error.phpt @@ -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"); diff --git a/sapi/cli/tests/cli_set_process_title_basic.phpt b/sapi/cli/tests/cli_set_process_title_basic.phpt index 9899f34..208abd4 100644 --- a/sapi/cli/tests/cli_set_process_title_basic.phpt +++ b/sapi/cli/tests/cli_set_process_title_basic.phpt @@ -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 && diff --git a/sapi/cli/tests/cli_set_process_title_error.phpt b/sapi/cli/tests/cli_set_process_title_error.phpt index 025c730..e55f86a 100644 --- a/sapi/cli/tests/cli_set_process_title_error.phpt +++ b/sapi/cli/tests/cli_set_process_title_error.phpt @@ -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(); diff --git a/tests/basic/012.phpt b/tests/basic/012.phpt index 038d4be..50af0b4 100644 --- a/tests/basic/012.phpt +++ b/tests/basic/012.phpt @@ -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 diff --git a/tests/basic/bug71273.phpt b/tests/basic/bug71273.phpt index 3db4454..3e32b7a 100644 --- a/tests/basic/bug71273.phpt +++ b/tests/basic/bug71273.phpt @@ -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 */
« previous php.cvs (#104412) next »