1--TEST--
2Test session_module_name() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.gc_probability=1
7session.gc_divisor=1
8session.gc_maxlifetime=0
9--FILE--
10<?php
11
12ob_start();
13
14/*
15 * Prototype : string session_module_name([string $module])
16 * Description : Get and/or set the current session module
17 * Source code : ext/session/session.c
18 */
19
20echo "*** Testing session_module_name() : variation ***\n";
21
22require_once "save_handler.inc";
23$path = dirname(__FILE__);
24session_save_path($path);
25session_module_name("files");
26
27session_start();
28$_SESSION["Blah"] = "Hello World!";
29$_SESSION["Foo"] = FALSE;
30$_SESSION["Guff"] = 1234567890;
31var_dump($_SESSION);
32
33var_dump(session_write_close());
34session_start();
35var_dump($_SESSION);
36var_dump(session_destroy());
37session_start();
38var_dump($_SESSION);
39var_dump(session_destroy());
40
41ob_end_flush();
42?>
43--EXPECTF--
44*** Testing session_module_name() : variation ***
45
46array(3) {
47  ["Blah"]=>
48  string(12) "Hello World!"
49  ["Foo"]=>
50  bool(false)
51  ["Guff"]=>
52  int(1234567890)
53}
54NULL
55array(3) {
56  ["Blah"]=>
57  string(12) "Hello World!"
58  ["Foo"]=>
59  bool(false)
60  ["Guff"]=>
61  int(1234567890)
62}
63bool(true)
64array(0) {
65}
66bool(true)
67
68