diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2017-02-02 00:57:40 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-02-02 00:58:04 +0100 |
| commit | fb008bf60e88e9bef10860322d1fa59d8e53b8f6 (patch) | |
| tree | 54aad9846f608e85b27f07a7a7cff8a07451490a | |
| parent | ac16d944bb571cd6b9e0fe27f5b03b64ddaeec55 (diff) | |
| download | php-git-fb008bf60e88e9bef10860322d1fa59d8e53b8f6.tar.gz | |
Remove obsolete version checks from tests
| -rw-r--r-- | Zend/tests/return_types/reflection001.phpt | 7 | ||||
| -rw-r--r-- | Zend/tests/unset_cv07.phpt | 18 | ||||
| -rw-r--r-- | ext/posix/tests/posix_access.phpt | 52 | ||||
| -rw-r--r-- | ext/posix/tests/posix_access_error_modes.phpt | 46 | ||||
| -rw-r--r-- | ext/posix/tests/posix_access_error_wrongparams.phpt | 44 | ||||
| -rw-r--r-- | ext/posix/tests/posix_access_safemode.phpt | 25 | ||||
| -rw-r--r-- | ext/posix/tests/posix_mkfifo_safemode.phpt | 45 | ||||
| -rw-r--r-- | ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt | 4 | ||||
| -rw-r--r-- | ext/reflection/tests/ReflectionFunction_getClosureThis.phpt | 4 | ||||
| -rw-r--r-- | ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt | 4 | ||||
| -rw-r--r-- | ext/reflection/tests/ReflectionMethod_getClosureThis.phpt | 4 | ||||
| -rw-r--r-- | ext/standard/tests/general_functions/import_request.phpt | 76 | ||||
| -rw-r--r-- | ext/standard/tests/general_functions/import_request1.phpt | 101 | ||||
| -rw-r--r-- | ext/standard/tests/general_functions/import_request2.phpt | 27 | ||||
| -rw-r--r-- | ext/standard/tests/general_functions/import_request3.phpt | 27 |
15 files changed, 6 insertions, 478 deletions
diff --git a/Zend/tests/return_types/reflection001.phpt b/Zend/tests/return_types/reflection001.phpt index 6492ee1906..c95f7292b5 100644 --- a/Zend/tests/return_types/reflection001.phpt +++ b/Zend/tests/return_types/reflection001.phpt @@ -1,12 +1,9 @@ --TEST-- Return type and Reflection::export() - --SKIPIF-- <?php -if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 70000) { - print 'skip'; -} - +if (!extension_loaded('reflection')) print 'skip'; +?> --FILE-- <?php diff --git a/Zend/tests/unset_cv07.phpt b/Zend/tests/unset_cv07.phpt deleted file mode 100644 index 3f893ca235..0000000000 --- a/Zend/tests/unset_cv07.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -unset() CV 7 (indirect unset() of global variable in import_request_variables()) ---SKIPIF-- -<?php if(PHP_VERSION_ID >= 50399){ die('skip not needed anymore without register_globals'); } ?> ---GET-- -x=2 ---FILE-- -<?php -$_x = "1\n"; -echo $_x; -import_request_variables("g","_"); -echo $_x; -echo "\nok\n"; -?> ---EXPECTF-- -1 -2 -ok diff --git a/ext/posix/tests/posix_access.phpt b/ext/posix/tests/posix_access.phpt deleted file mode 100644 index 47b5e15f0b..0000000000 --- a/ext/posix/tests/posix_access.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test posix_access() function test ---DESCRIPTION-- -checks for existence, read-access, write-access, execute-access ---CREDITS-- -Moritz Neuhaeuser, info@xcompile.net -PHP Testfest Berlin 2009-05-10 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -if (posix_geteuid() == 0) { - die('SKIP Cannot run test as root.'); -} -if (PHP_VERSION_ID < 503099) { - die('SKIP Safe mode is no longer available.'); -} -?> ---FILE-- -<?php -$filename = dirname(__FILE__) . '/foo.test'; -$fp = fopen($filename,"w"); -fwrite($fp,"foo"); -fclose($fp); - -chmod ($filename, 0000); -var_dump(posix_access($filename, POSIX_F_OK)); - -chmod ($filename, 0400); -var_dump(posix_access($filename, POSIX_R_OK)); - -chmod ($filename, 0600); -var_dump(posix_access($filename, POSIX_W_OK)); - -chmod ($filename, 0700); -var_dump(posix_access($filename, POSIX_X_OK)); -?> -===DONE=== ---CLEAN-- -<?php -$filename = dirname(__FILE__) . '/foo.test'; -chmod ($filename, 0700); -unlink($filename); -?> ---EXPECTF-- -Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d -bool(true) -bool(true) -bool(true) -bool(true) -===DONE=== diff --git a/ext/posix/tests/posix_access_error_modes.phpt b/ext/posix/tests/posix_access_error_modes.phpt deleted file mode 100644 index fb04e34683..0000000000 --- a/ext/posix/tests/posix_access_error_modes.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test posix_access() function test error conditions ---DESCRIPTION-- -checks if posix_access() failes for wrong permissions ---CREDITS-- -Moritz Neuhaeuser, info@xcompile.net -PHP Testfest Berlin 2009-05-10 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -if (posix_geteuid() == 0) { - die('SKIP Cannot run test as root.'); -} -if (PHP_VERSION_ID < 503099) { - die('SKIP Safe mode is no longer available.'); -} -?> ---FILE-- -<?php -$filename = dirname(__FILE__) . '/foo.test'; -var_dump(posix_access($filename, POSIX_F_OK)); -$fp = fopen($filename,"w"); -fwrite($fp,"foo"); -fclose($fp); - -chmod ($filename, 0000); -var_dump(posix_access($filename, POSIX_R_OK)); -var_dump(posix_access($filename, POSIX_W_OK)); -var_dump(posix_access($filename, POSIX_X_OK)); -?> -===DONE=== ---CLEAN-- -<?php -$filename = dirname(__FILE__) . '/foo.test'; -chmod ($filename, 0700); -unlink($filename); -?> ---EXPECTF-- -WDeprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line %d -bool(false) -bool(false) -bool(false) -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_access_error_wrongparams.phpt b/ext/posix/tests/posix_access_error_wrongparams.phpt deleted file mode 100644 index dcab33c4a7..0000000000 --- a/ext/posix/tests/posix_access_error_wrongparams.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Test posix_access() function : parameter validation ---DESCRIPTION-- -cases: no params, wrong param1, wrong param2, null directory, wrong directory, ---CREDITS-- -Moritz Neuhaeuser, info@xcompile.net -PHP Testfest Berlin 2009-05-10 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -if (posix_geteuid() == 0) { - die('SKIP Cannot run test as root.'); -} -if (PHP_VERSION_ID < 503099) { - die('SKIP Safe mode is no longer available.'); -} -?> ---FILE-- -<?php - -var_dump( posix_access() ); -var_dump( posix_access(array()) ); -var_dump( posix_access('foo',array()) ); -var_dump( posix_access(null) ); - -var_dump(posix_access('./foobar')); -?> -===DONE=== ---EXPECTF-- -Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 - -Warning: posix_access() expects at least 1 parameter, 0 given in %s on line %d -bool(false) - -Warning: posix_access() expects parameter 1 to be string, array given in %s on line %d -bool(false) - -Warning: posix_access() expects parameter 2 to be integer, array given in %s on line %d -bool(false) -bool(false) -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_access_safemode.phpt b/ext/posix/tests/posix_access_safemode.phpt deleted file mode 100644 index b726b4fdbb..0000000000 --- a/ext/posix/tests/posix_access_safemode.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Test posix_access() with safe_mode enabled. ---CREDITS-- -Till Klampaeckel, till@php.net -TestFest Berlin 2009 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -if (posix_geteuid() == 0) { - die('SKIP Cannot run test as root.'); -} -if (PHP_VERSION_ID < 503099) { - die('SKIP Safe mode is no longer available.'); -} ---FILE-- -<?php -var_dump(posix_access('/tmp', POSIX_W_OK)); -?> -===DONE=== ---EXPECTF-- -Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d -bool(false) -===DONE=== diff --git a/ext/posix/tests/posix_mkfifo_safemode.phpt b/ext/posix/tests/posix_mkfifo_safemode.phpt deleted file mode 100644 index 1126c00df0..0000000000 --- a/ext/posix/tests/posix_mkfifo_safemode.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Test posix_mkfifo() with safe_mode. ---DESCRIPTION-- -The test attempts to enable safe_mode, catches all the relevant E_WARNING's and tries to create a fifo in /tmp. - -The first attempt (writing to /tmp) should effectively fail because /tmp is owned by root. - -The second attempt (writing to a local created file) works. ---CREDITS-- -Till Klampaeckel, till@php.net -TestFest Berlin 2009 ---SKIPIF-- -<?php -if (!extension_loaded('posix')) { - die('SKIP The posix extension is not loaded.'); -} -if (posix_geteuid() == 0) { - die('SKIP Cannot run test as root.'); -} -if (PHP_VERSION_ID < 503099) { - die('SKIP Safe mode is no longer available.'); -} -?> ---FILE-- -<?php -var_dump(posix_mkfifo('/tmp/foobar', 0644)); - -$dir = dirname(__FILE__) . '/foo'; -mkdir ($dir); -var_dump(posix_mkfifo($dir . '/bar', 0644)); -?> -===DONE=== ---CLEAN-- -<?php -$dir = dirname(__FILE__) . '/foo'; -unlink($dir . '/bar'); -rmdir($dir); -?> ---EXPECTF-- -Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d - -Warning: posix_mkfifo(): SAFE MODE Restriction in effect. The script whose uid is %d is not allowed to access /tmp owned by uid %d in %s on line %d -bool(false) -bool(true) -===DONE=== diff --git a/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt b/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt index f725dfd088..e32790c923 100644 --- a/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt +++ b/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt @@ -2,9 +2,7 @@ Reflection::getClosureScopeClass() --SKIPIF-- <?php -if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50399) { - print 'skip'; -} +if (!extension_loaded('reflection')) print 'skip'; ?> --FILE-- <?php diff --git a/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt b/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt index 776bfafee0..4795025798 100644 --- a/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt +++ b/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt @@ -2,9 +2,7 @@ Reflection::getClosureThis() --SKIPIF-- <?php -if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) { - print 'skip'; -} +if (!extension_loaded('reflection')) print 'skip'; ?> --FILE-- <?php diff --git a/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt b/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt index 368464e130..df101fcd3e 100644 --- a/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt +++ b/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt @@ -5,9 +5,7 @@ Stefan Koopmanschap <stefan@phpgg.nl> TestFest PHP|Tek --SKIPIF-- <?php -if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) { - print 'skip'; -} +if (!extension_loaded('reflection')) print 'skip'; ?> --FILE-- <?php diff --git a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt index 58c09994cf..536f40c2e1 100644 --- a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt +++ b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt @@ -2,9 +2,7 @@ Reflection::getClosureThis() --SKIPIF-- <?php -if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) { - print 'skip'; -} +if (!extension_loaded('reflection')) print 'skip'; ?> --FILE-- <?php diff --git a/ext/standard/tests/general_functions/import_request.phpt b/ext/standard/tests/general_functions/import_request.phpt deleted file mode 100644 index 4a791c736a..0000000000 --- a/ext/standard/tests/general_functions/import_request.phpt +++ /dev/null @@ -1,76 +0,0 @@ ---TEST-- -import_request_variables() tests ---SKIPIF-- -<?php if(PHP_VERSION_ID >= 50399){ die('skip not needed anymore without register_globals'); } ?> ---GET-- -a=1&b=heh&c=3&d[]=5&GLOBALS=test&1=hm ---POST-- -ap=25&bp=test&cp=blah3&dp[]=ar ---FILE-- -<?php - -var_dump(import_request_variables()); -var_dump(import_request_variables("")); -var_dump(import_request_variables("", "")); - -var_dump(import_request_variables("g", "")); -var_dump($a, $b, $c, $ap); - -var_dump(import_request_variables("g", "g_")); -var_dump($g_a, $g_b, $g_c, $g_ap, $g_1); - -var_dump(import_request_variables("GP", "i_")); -var_dump($i_a, $i_b, $i_c, $i_ap, $i_bp, $i_cp, $i_dp); - -var_dump(import_request_variables("gGg", "r_")); -var_dump($r_a, $r_b, $r_c, $r_ap); - -echo "Done\n"; -?> ---EXPECTF-- -Warning: import_request_variables() expects at least 1 parameter, 0 given in %s on line %d -NULL -bool(false) - -Notice: import_request_variables(): No prefix specified - possible security hazard in %s on line %d -bool(false) - -Notice: import_request_variables(): No prefix specified - possible security hazard in %s on line %d - -Warning: import_request_variables(): Attempted GLOBALS variable overwrite in %s on line %d - -Warning: import_request_variables(): Numeric key detected - possible security hazard in %s on line %d -bool(true) - -Notice: Undefined variable: ap in %s on line %d -string(1) "1" -string(3) "heh" -string(1) "3" -NULL -bool(true) - -Notice: Undefined variable: g_ap in %s on line %d -string(1) "1" -string(3) "heh" -string(1) "3" -NULL -string(2) "hm" -bool(true) -string(1) "1" -string(3) "heh" -string(1) "3" -string(2) "25" -string(4) "test" -string(5) "blah3" -array(1) { - [0]=> - string(2) "ar" -} -bool(true) - -Notice: Undefined variable: r_ap in %s on line %d -string(1) "1" -string(3) "heh" -string(1) "3" -NULL -Done diff --git a/ext/standard/tests/general_functions/import_request1.phpt b/ext/standard/tests/general_functions/import_request1.phpt deleted file mode 100644 index f592088afc..0000000000 --- a/ext/standard/tests/general_functions/import_request1.phpt +++ /dev/null @@ -1,101 +0,0 @@ ---TEST-- -import_request_variables() test (overwrite super-globals) ---SKIPIF-- -<?php if(PHP_VERSION_ID >= 50399){ die('skip not needed anymore without register_globals'); } ?> ---GET-- -GET=0&POST=1&COOKIE=2&FILES=3&REQUEST=4 ---POST-- -GET=5&POST=6&COOKIE=7&FILES=8&REQUEST=9 ---COOKIE-- -GET=10;POST=11;COOKIE=12;FILES=13;REQUEST=14 ---INI-- -variables_order=CGP ---FILE-- -<?php - -import_request_variables("gpc", "_"); -var_dump($_GET, $_POST, $_COOKIE, $_FILES, $_REQUEST); - -echo "Done\n"; -?> ---EXPECTF-- -Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_GET) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_POST) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_COOKIE) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_FILES) variable overwrite in %s on line %d - -Warning: import_request_variables(): Attempted super-global (_REQUEST) variable overwrite in %s on line %d -array(5) { - ["GET"]=> - string(1) "0" - ["POST"]=> - string(1) "1" - ["COOKIE"]=> - string(1) "2" - ["FILES"]=> - string(1) "3" - ["REQUEST"]=> - string(1) "4" -} -array(5) { - ["GET"]=> - string(1) "5" - ["POST"]=> - string(1) "6" - ["COOKIE"]=> - string(1) "7" - ["FILES"]=> - string(1) "8" - ["REQUEST"]=> - string(1) "9" -} -array(5) { - ["GET"]=> - string(2) "10" - ["POST"]=> - string(2) "11" - ["COOKIE"]=> - string(2) "12" - ["FILES"]=> - string(2) "13" - ["REQUEST"]=> - string(2) "14" -} -array(0) { -} -array(5) { - ["GET"]=> - string(1) "5" - ["POST"]=> - string(1) "6" - ["COOKIE"]=> - string(1) "7" - ["FILES"]=> - string(1) "8" - ["REQUEST"]=> - string(1) "9" -} -Done diff --git a/ext/standard/tests/general_functions/import_request2.phpt b/ext/standard/tests/general_functions/import_request2.phpt deleted file mode 100644 index c290602b23..0000000000 --- a/ext/standard/tests/general_functions/import_request2.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -import_request_variables() test (numeric keys) ---SKIPIF-- -<?php if(PHP_VERSION_ID >= 50399){ die('skip not needed anymore without register_globals'); } ?> ---GET-- -1=0&2=1&3=2&4=3&5=4 ---POST-- -1=5&2=6&3=7&4=8&5=9 ---COOKIE-- -1=10;2=11;3=12;4=13;5=14 ---INI-- -variables_order=CGP ---FILE-- -<?php - -import_request_variables("gpc", "_"); -var_dump($_1, $_2, $_3, $_4, $_5); - -echo "Done\n"; -?> ---EXPECTF-- -string(2) "10" -string(2) "11" -string(2) "12" -string(2) "13" -string(2) "14" -Done diff --git a/ext/standard/tests/general_functions/import_request3.phpt b/ext/standard/tests/general_functions/import_request3.phpt deleted file mode 100644 index a8cbf565dd..0000000000 --- a/ext/standard/tests/general_functions/import_request3.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -import_request_variables() test (numeric keys, different order) ---SKIPIF-- -<?php if(PHP_VERSION_ID >= 50399){ die('skip not needed anymore without register_globals'); } ?> ---GET-- -1=0&2=1&3=2&4=3&5=4 ---POST-- -1=5&2=6&3=7&4=8&5=9 ---COOKIE-- -1=10;2=11;3=12;4=13;5=14 ---INI-- -variables_order=CGP ---FILE-- -<?php - -import_request_variables("gcp", "_"); -var_dump($_1, $_2, $_3, $_4, $_5); - -echo "Done\n"; -?> ---EXPECTF-- -string(1) "5" -string(1) "6" -string(1) "7" -string(1) "8" -string(1) "9" -Done |
