mirror of
https://github.com/php/php-src.git
synced 2024-12-14 12:26:19 +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.
41 lines
773 B
PHP
41 lines
773 B
PHP
--TEST--
|
|
Test session_name() function : error functionality
|
|
--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() : error functionality ***\n";
|
|
|
|
var_dump(session_name());
|
|
var_dump(session_name("blah"));
|
|
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() : error functionality ***
|
|
string(9) "PHPSESSID"
|
|
string(9) "PHPSESSID"
|
|
bool(true)
|
|
string(4) "blah"
|
|
bool(true)
|
|
string(4) "blah"
|
|
Done
|
|
|