From 47cc29c9d171be482c983466258b0e9703f3b915 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Thu, 3 Oct 2002 22:54:15 +0000 Subject: 19: serializing references test case using globals 18: rewriter correctly handles attribute names which contain dashes --- ext/session/tests/018.phpt | 22 ++++++++++++++ ext/session/tests/019.phpt | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 ext/session/tests/018.phpt create mode 100644 ext/session/tests/019.phpt diff --git a/ext/session/tests/018.phpt b/ext/session/tests/018.phpt new file mode 100644 index 0000000000..4694c1b7a2 --- /dev/null +++ b/ext/session/tests/018.phpt @@ -0,0 +1,22 @@ +--TEST-- +rewriter correctly handles attribute names which contain dashes +--SKIPIF-- + +--INI-- +session.use_cookies=0 +session.cache_limiter= +session.use_trans_sid=1 +--FILE-- + +
+ +--EXPECT-- + diff --git a/ext/session/tests/019.phpt b/ext/session/tests/019.phpt new file mode 100644 index 0000000000..994660cc6b --- /dev/null +++ b/ext/session/tests/019.phpt @@ -0,0 +1,72 @@ +--TEST-- +serializing references test case using globals +--SKIPIF-- + +--INI-- +session.use_cookies=0 +session.cache_limiter= +session.use_trans_sid=1 +register_globals=1 +--FILE-- +c = $c; + } + function inc() { + $this->c++; + } +} + +session_id("abtest"); +session_register('o1', 'o2' ); +session_start(); + +$o1 =& new TFoo(42); +$o2 =& $o1; + +session_write_close(); + +unset($o1); +unset($o2); + +session_start(); + +var_dump($_SESSION); + +$o1->inc(); +$o2->inc(); + +var_dump($_SESSION); + +session_destroy(); +?> +--EXPECT-- +array(2) { + ["o1"]=> + &object(tfoo)(1) { + ["c"]=> + int(42) + } + ["o2"]=> + &object(tfoo)(1) { + ["c"]=> + int(42) + } +} +array(2) { + ["o1"]=> + &object(tfoo)(1) { + ["c"]=> + int(44) + } + ["o2"]=> + &object(tfoo)(1) { + ["c"]=> + int(44) + } +} -- cgit v1.2.1