File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / session_module_name_variation4.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>