File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / session_destroy_variation1.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, 4 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_destroy() function : variation
    3: --SKIPIF--
    4: <?php include('skipif.inc'); ?>
    5: --FILE--
    6: <?php
    7: 
    8: ob_start();
    9: 
   10: /* 
   11:  * Prototype : bool session_destroy(void)
   12:  * Description : Destroys all data registered to a session
   13:  * Source code : ext/session/session.c 
   14:  */
   15: 
   16: echo "*** Testing session_destroy() : variation ***\n";
   17: 
   18: var_dump(session_start());
   19: var_dump(session_destroy());
   20: var_dump(session_destroy());
   21: var_dump(session_destroy());
   22: var_dump(session_destroy());
   23: var_dump(session_destroy());
   24: 
   25: echo "Done";
   26: ob_end_flush();
   27: ?>
   28: --EXPECTF--
   29: *** Testing session_destroy() : variation ***
   30: bool(true)
   31: bool(true)
   32: 
   33: Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
   34: bool(false)
   35: 
   36: Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
   37: bool(false)
   38: 
   39: Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
   40: bool(false)
   41: 
   42: Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
   43: bool(false)
   44: Done
   45: 

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