File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / session_cache_limiter_basic.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_cache_limiter() function : basic functionality
    3: --SKIPIF--
    4: <?php include('skipif.inc'); ?>
    5: --FILE--
    6: <?php
    7: 
    8: ob_start();
    9: 
   10: /* 
   11:  * Prototype : string session_cache_limiter([string $cache_limiter])
   12:  * Description : Get and/or set the current cache limiter
   13:  * Source code : ext/session/session.c 
   14:  */
   15: 
   16: echo "*** Testing session_cache_limiter() : basic functionality ***\n";
   17: 
   18: var_dump(session_start());
   19: var_dump(session_cache_limiter());
   20: var_dump(session_cache_limiter("public"));
   21: var_dump(session_cache_limiter());
   22: var_dump(session_destroy());
   23: 
   24: var_dump(session_start());
   25: var_dump(session_cache_limiter());
   26: var_dump(session_cache_limiter("private"));
   27: var_dump(session_cache_limiter());
   28: var_dump(session_destroy());
   29: 
   30: var_dump(session_start());
   31: var_dump(session_cache_limiter());
   32: var_dump(session_cache_limiter("nocache"));
   33: var_dump(session_cache_limiter());
   34: var_dump(session_destroy());
   35: 
   36: var_dump(session_start());
   37: var_dump(session_cache_limiter());
   38: var_dump(session_cache_limiter("private_no_expire"));
   39: var_dump(session_cache_limiter());
   40: var_dump(session_destroy());
   41: 
   42: echo "Done";
   43: ob_end_flush();
   44: ?>
   45: --EXPECTF--
   46: *** Testing session_cache_limiter() : basic functionality ***
   47: bool(true)
   48: string(7) "nocache"
   49: string(7) "nocache"
   50: string(6) "public"
   51: bool(true)
   52: bool(true)
   53: string(6) "public"
   54: string(6) "public"
   55: string(7) "private"
   56: bool(true)
   57: bool(true)
   58: string(7) "private"
   59: string(7) "private"
   60: string(7) "nocache"
   61: bool(true)
   62: bool(true)
   63: string(7) "nocache"
   64: string(7) "nocache"
   65: string(17) "private_no_expire"
   66: bool(true)
   67: Done
   68: 

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