mirror of
https://github.com/php/php-src.git
synced 2025-01-21 11:13:38 +08:00
c55db17098
These were caused by the tests assuming default values for some session configuration settings, in particular session.save_path and session.name. The tests now explicitly set these settings in the --INI-- section.
61 lines
1.1 KiB
PHP
61 lines
1.1 KiB
PHP
--TEST--
|
|
Test session_name() function : variation
|
|
--INI--
|
|
session.save_path=
|
|
session.name=PHPSESSID
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
ob_start();
|
|
|
|
/*
|
|
* Prototype : string session_name([string $name])
|
|
* Description : Get and/or set the current session name
|
|
* Source code : ext/session/session.c
|
|
*/
|
|
|
|
echo "*** Testing session_name() : variation ***\n";
|
|
|
|
var_dump(session_name("\0"));
|
|
var_dump(session_start());
|
|
var_dump(session_name());
|
|
var_dump(session_destroy());
|
|
var_dump(session_name());
|
|
|
|
var_dump(session_name("\t"));
|
|
var_dump(session_start());
|
|
var_dump(session_name());
|
|
var_dump(session_destroy());
|
|
var_dump(session_name());
|
|
|
|
var_dump(session_name(""));
|
|
var_dump(session_start());
|
|
var_dump(session_name());
|
|
var_dump(session_destroy());
|
|
var_dump(session_name());
|
|
|
|
echo "Done";
|
|
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
|
|
|