com php-src: Remove two more zpp variation tests: ext/session/t ests/session_cache_expire_error.phpt ext/standard/tes
ts/array/array_slice_variation2.phpt

From: Date: Thu, 07 Feb 2019 14:38:43 +0000
Subject: com php-src: Remove two more zpp variation tests: ext/session/t ests/session_cache_expire_error.phpt ext/standard/tes
ts/array/array_slice_variation2.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104466@lists.php.net to get a copy of this message
Commit: 689521af8e9b8c6ddbc3b51344baf0ec83e044b1 Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 7 Feb 2019 15:35:39 +0100 Parents: f1e7dd3966e7d77672b067f824941a5344c0b32c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=689521af8e9b8c6ddbc3b51344baf0ec83e044b1 Log: Remove two more zpp variation tests These are normal zpp arguments in PHP 8. Also not adjusted for 32-bit systems... Changed paths: D ext/session/tests/session_cache_expire_error.phpt D ext/standard/tests/array/array_slice_variation2.phpt Diff: diff --git a/ext/session/tests/session_cache_expire_error.phpt b/ext/session/tests/session_cache_expire_error.phpt deleted file mode 100644 index 484d422..0000000 --- a/ext/session/tests/session_cache_expire_error.phpt +++ /dev/null @@ -1,183 +0,0 @@ ---TEST-- -Test session_cache_expire() function : error functionality ---SKIPIF-- -<?php include('skipif.inc'); ?> ---FILE-- -<?php - -ob_start(); - -/* - * Prototype : int session_cache_expire([int $new_cache_expire]) - * Description : Return current cache expire - * Source code : ext/session/session.c - */ - -echo "*** Testing session_cache_expire() : error functionality ***\n"; - -// Get an unset variable -$unset_var = 10; -unset($unset_var); - -class classA -{ - public function __toString() { - return "Hello World!"; - } -} - -$heredoc = <<<EOT -Hello World! -EOT; - -$fp = fopen(__FILE__, "r"); - -// Unexpected values to be passed as arguments -$inputs = array( - - // Integer data -/*1*/ 0, - 1, - 12345, - -2345, - - // Float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // Null data -/*10*/ NULL, - null, - - // Boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // Empty strings -/*16*/ "", - '', - - // Invalid string data -/*18*/ "Nothing", - 'Nothing', - $heredoc, - - // Object data -/*21*/ new classA(), - - // Undefined data -/*22*/ @$undefined_var, - - // Unset data -/*23*/ @$unset_var, - - // Resource variable -/*24*/ $fp -); - - -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump(session_cache_expire($input)); - $iterator++; -}; - -fclose($fp); -echo "Done"; -ob_end_flush(); -?> ---EXPECTF-- -*** Testing session_cache_expire() : error functionality *** - --- Iteration 1 -- -int(180) - --- Iteration 2 -- -int(0) - --- Iteration 3 -- -int(1) - --- Iteration 4 -- -int(12345) - --- Iteration 5 -- -int(-2345) - --- Iteration 6 -- -int(10) - --- Iteration 7 -- -int(-10) - --- Iteration 8 -- -int(%s) - --- Iteration 9 -- -int(0) - --- Iteration 10 -- -int(0) - --- Iteration 11 -- -int(0) - --- Iteration 12 -- -int(0) - --- Iteration 13 -- -int(1) - --- Iteration 14 -- -int(0) - --- Iteration 15 -- -int(1) - --- Iteration 16 -- - -Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: session_cache_expire() expects parameter 1 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: session_cache_expire() expects parameter 1 to be int, object given in %s on line %d -NULL - --- Iteration 22 -- -int(0) - --- Iteration 23 -- -int(0) - --- Iteration 24 -- - -Warning: session_cache_expire() expects parameter 1 to be int, resource given in %s on line %d -NULL -Done diff --git a/ext/standard/tests/array/array_slice_variation2.phpt b/ext/standard/tests/array/array_slice_variation2.phpt deleted file mode 100644 index a76d68e..0000000 --- a/ext/standard/tests/array/array_slice_variation2.phpt +++ /dev/null @@ -1,303 +0,0 @@ ---TEST-- -Test array_slice() function : usage variations - Pass different data types as $offset arg ---SKIPIF-- -<?php if (PHP_INT_SIZE > 4) die("skip this test is for 32bit platform only"); ?> ---FILE-- -<?php -/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]]) - * Description: Returns elements specified by offset and length - * Source code: ext/standard/array.c - */ - -/* - * Pass different data types as $offset argument to array_slice() to test behaviour - */ - -echo "*** Testing array_slice() : usage variations ***\n"; - -// Initialise function arguments not being substituted -$input_array = array('one' => 1, 2, 'three' => 3, 4); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = <<<EOT -hello world -EOT; - -// get a resource variable -$fp = fopen(__FILE__, "r"); - -// unexpected values to be passed to $offset argument -$inputs = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10..5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // null data -/*10*/ NULL, - null, - - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // empty data -/*16*/ "", - '', - array(), - - // string data -/*19*/ "string", - 'string', - $heredoc, - - // undefined data -/*22*/ @$undefined_var, - - // unset data -/*23*/ @$unset_var, -); - -// loop through each element of $inputs to check the behavior of array_slice() -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump( array_slice($input_array, $input) ); - $iterator++; -}; - -fclose($fp); - -echo "Done"; -?> ---EXPECTF-- -*** Testing array_slice() : usage variations *** - --- Iteration 1 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 2 -- -array(3) { - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 3 -- -array(0) { -} - --- Iteration 4 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 5 -- -array(0) { -} - --- Iteration 6 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 7 -- - -Warning: array_slice() expects parameter 2 to be int, float given in %s on line %d -NULL - --- Iteration 8 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 9 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 10 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 11 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 12 -- -array(3) { - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 13 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 14 -- -array(3) { - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 15 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 16 -- - -Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 18 -- - -Warning: array_slice() expects parameter 2 to be int, array given in %s on line %d -NULL - --- Iteration 19 -- - -Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_slice() expects parameter 2 to be int, string given in %s on line %d -NULL - --- Iteration 22 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} - --- Iteration 23 -- -array(4) { - ["one"]=> - int(1) - [0]=> - int(2) - ["three"]=> - int(3) - [1]=> - int(4) -} -Done

« previous php.cvs (#104466) next »