Annotation of embedaddon/php/ext/session/tests/bug63379_nodestroy.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #63379: Warning when using session_regenerate_id(TRUE) with a SessionHandler
                      3: --INI--
                      4: session.save_handler=files
                      5: session.name=PHPSESSID
                      6: --SKIPIF--
                      7: <?php include('skipif.inc'); ?>
                      8: --FILE--
                      9: <?php
                     10: 
                     11: ob_start();
                     12: 
                     13: $handler = new SessionHandler;
                     14: session_set_save_handler($handler);
                     15: 
                     16: session_start();
                     17: 
                     18: $_SESSION['foo'] = 'hello';
                     19: var_dump($_SESSION);
                     20: 
                     21: session_regenerate_id(false);
                     22: 
                     23: echo "*** Regenerated ***\n";
                     24: var_dump($_SESSION);
                     25: 
                     26: $_SESSION['bar'] = 'world';
                     27: 
                     28: var_dump($_SESSION);
                     29: 
                     30: session_write_close();
                     31: session_unset();
                     32: 
                     33: session_start();
                     34: var_dump($_SESSION);
                     35: 
                     36: --EXPECTF--
                     37: array(1) {
                     38:   ["foo"]=>
                     39:   string(5) "hello"
                     40: }
                     41: *** Regenerated ***
                     42: array(1) {
                     43:   ["foo"]=>
                     44:   string(5) "hello"
                     45: }
                     46: array(2) {
                     47:   ["foo"]=>
                     48:   string(5) "hello"
                     49:   ["bar"]=>
                     50:   string(5) "world"
                     51: }
                     52: array(2) {
                     53:   ["foo"]=>
                     54:   string(5) "hello"
                     55:   ["bar"]=>
                     56:   string(5) "world"
                     57: }

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