mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
Latest and greatest versions of these session tests - checked on 6.0 snap on Windows, Linux and Linux 64 bit.
This commit is contained in:
parent
8cdff55a26
commit
d88187cf94
@ -38,6 +38,17 @@ ob_end_flush();
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing session_module_name() : variation ***
|
||||
string(%d) "%s"
|
||||
string(4) "user"
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' with message 'Stop...!' in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: open('', 'PHPSESSID')
|
||||
#1 %s(%d): session_start()
|
||||
#2 {main}
|
||||
thrown in %s on line %d
|
||||
--UEXPECTF--
|
||||
*** Testing session_module_name() : variation ***
|
||||
unicode(5) "files"
|
||||
unicode(4) "user"
|
||||
|
||||
|
@ -30,6 +30,15 @@ ob_end_flush();
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing session_name() : error functionality ***
|
||||
string(9) "PHPSESSID"
|
||||
string(9) "PHPSESSID"
|
||||
bool(true)
|
||||
string(4) "blah"
|
||||
bool(true)
|
||||
string(4) "blah"
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing session_name() : error functionality ***
|
||||
unicode(9) "PHPSESSID"
|
||||
unicode(9) "PHPSESSID"
|
||||
bool(true)
|
||||
|
@ -97,6 +97,83 @@ ob_end_flush();
|
||||
--EXPECTF--
|
||||
*** Testing session_name() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
string(9) "PHPSESSID"
|
||||
|
||||
-- Iteration 2 --
|
||||
string(1) "0"
|
||||
|
||||
-- Iteration 3 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 4 --
|
||||
string(5) "12345"
|
||||
|
||||
-- Iteration 5 --
|
||||
string(5) "-2345"
|
||||
|
||||
-- Iteration 6 --
|
||||
string(4) "10.5"
|
||||
|
||||
-- Iteration 7 --
|
||||
string(5) "-10.5"
|
||||
|
||||
-- Iteration 8 --
|
||||
string(12) "123456789000"
|
||||
|
||||
-- Iteration 9 --
|
||||
string(13) "1.23456789E-9"
|
||||
|
||||
-- Iteration 10 --
|
||||
string(3) "0.5"
|
||||
|
||||
-- Iteration 11 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 12 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 13 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 14 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 15 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 16 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 17 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 18 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 19 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 20 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 21 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 22 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 23 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 24 --
|
||||
|
||||
Warning: session_name() expects parameter 1 to be string, resource given in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing session_name() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
unicode(9) "PHPSESSID"
|
||||
|
||||
|
@ -41,6 +41,24 @@ ob_end_flush();
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing session_name() : variation ***
|
||||
string(9) "PHPSESSID"
|
||||
bool(true)
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(1) " "
|
||||
bool(true)
|
||||
string(1) " "
|
||||
string(1) " "
|
||||
bool(true)
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(0) ""
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing session_name() : variation ***
|
||||
unicode(9) "PHPSESSID"
|
||||
bool(true)
|
||||
unicode(0) ""
|
||||
|
@ -29,6 +29,12 @@ ob_end_flush();
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing session_save_path() : error functionality ***
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(%d) "%s"
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing session_save_path() : error functionality ***
|
||||
unicode(0) ""
|
||||
unicode(0) ""
|
||||
unicode(%d) "%s"
|
||||
|
@ -101,6 +101,83 @@ ob_end_flush();
|
||||
--EXPECTF--
|
||||
*** Testing session_save_path() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 2 --
|
||||
string(1) "0"
|
||||
|
||||
-- Iteration 3 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 4 --
|
||||
string(5) "12345"
|
||||
|
||||
-- Iteration 5 --
|
||||
string(5) "-2345"
|
||||
|
||||
-- Iteration 6 --
|
||||
string(4) "10.5"
|
||||
|
||||
-- Iteration 7 --
|
||||
string(5) "-10.5"
|
||||
|
||||
-- Iteration 8 --
|
||||
string(12) "123456789000"
|
||||
|
||||
-- Iteration 9 --
|
||||
string(13) "1.23456789E-9"
|
||||
|
||||
-- Iteration 10 --
|
||||
string(3) "0.5"
|
||||
|
||||
-- Iteration 11 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 12 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 13 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 14 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 15 --
|
||||
string(1) "1"
|
||||
|
||||
-- Iteration 16 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 17 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 18 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 19 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 20 --
|
||||
string(7) "Nothing"
|
||||
|
||||
-- Iteration 21 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 22 --
|
||||
string(12) "Hello World!"
|
||||
|
||||
-- Iteration 23 --
|
||||
string(0) ""
|
||||
|
||||
-- Iteration 24 --
|
||||
|
||||
Warning: session_save_path() expects parameter 1 to be string, resource given in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing session_save_path() : error functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
unicode(0) ""
|
||||
|
||||
|
@ -33,6 +33,16 @@ ob_end_flush();
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing session_save_path() : variation ***
|
||||
string(0) ""
|
||||
bool(true)
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(%d) "%s"
|
||||
bool(true)
|
||||
string(%d) "%s"
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing session_save_path() : variation ***
|
||||
unicode(0) ""
|
||||
bool(true)
|
||||
unicode(0) ""
|
||||
|
@ -22,10 +22,10 @@ ob_start();
|
||||
*/
|
||||
|
||||
echo "*** Testing session_save_path() : variation ***\n";
|
||||
$directory = dirname(__FILE__);
|
||||
$sessions = ($directory."/sessions");
|
||||
$initdir = getcwd();
|
||||
$sessions = ($initdir."/sessions");
|
||||
|
||||
chdir($directory);
|
||||
chdir($initdir);
|
||||
|
||||
// Delete the existing directory
|
||||
if (file_exists($sessions) === TRUE) {
|
||||
@ -34,7 +34,7 @@ if (file_exists($sessions) === TRUE) {
|
||||
|
||||
var_dump(mkdir($sessions));
|
||||
var_dump(chdir($sessions));
|
||||
ini_set("session.save_path", $directory);
|
||||
ini_set("session.save_path", $initdir);
|
||||
var_dump(session_save_path());
|
||||
var_dump(session_start());
|
||||
var_dump(session_save_path());
|
||||
@ -46,11 +46,9 @@ echo "Done";
|
||||
ob_end_flush();
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
$directory = dirname(__FILE__);
|
||||
$sessions = ($directory."/sessions");
|
||||
$initdir = getcwd();
|
||||
$sessions = ($initdir."/sessions");
|
||||
var_dump(rmdir($sessions));
|
||||
?>
|
||||
--EXPECTF--
|
||||
*** Testing session_save_path() : variation ***
|
||||
bool(true)
|
||||
|
@ -50,6 +50,52 @@ ob_end_flush();
|
||||
--EXPECTF--
|
||||
*** Testing session_set_save_handler() : basic functionality ***
|
||||
|
||||
string(5) "files"
|
||||
|
||||
Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: session_module_name(): Cannot find named PHP session module (blah) in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: session_module_name(): Cannot find named PHP session module (foo) in %s on line %d
|
||||
bool(false)
|
||||
Open [%s,PHPSESSID]
|
||||
Read [%s,%s]
|
||||
array(3) {
|
||||
["Blah"]=>
|
||||
string(12) "Hello World!"
|
||||
["Foo"]=>
|
||||
bool(false)
|
||||
["Guff"]=>
|
||||
int(1234567890)
|
||||
}
|
||||
Write [%s,%s,Blah|S:12:"Hello World!";Foo|b:0;Guff|i:1234567890;]
|
||||
Close [%s,PHPSESSID]
|
||||
array(3) {
|
||||
["Blah"]=>
|
||||
string(12) "Hello World!"
|
||||
["Foo"]=>
|
||||
bool(false)
|
||||
["Guff"]=>
|
||||
int(1234567890)
|
||||
}
|
||||
Starting session again..!
|
||||
Open [%s,PHPSESSID]
|
||||
Read [%s,%s]
|
||||
array(3) {
|
||||
["Blah"]=>
|
||||
string(12) "Hello World!"
|
||||
["Foo"]=>
|
||||
bool(false)
|
||||
["Guff"]=>
|
||||
int(1234567890)
|
||||
}
|
||||
Write [%s,%s,Blah|S:12:"Hello World!";Foo|b:0;Guff|i:1234567890;]
|
||||
Close [%s,PHPSESSID]
|
||||
--UEXPECTF--
|
||||
*** Testing session_set_save_handler() : basic functionality ***
|
||||
|
||||
unicode(5) "files"
|
||||
|
||||
Warning: session_module_name(): Cannot find named PHP session module () in %s on line %d
|
||||
|
Loading…
Reference in New Issue
Block a user