From 5722a0e1ce69643074b96d95d7165fd8347fcd57 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 24 Dec 2000 15:57:05 +0000 Subject: [PATCH] Add two regression tests for the session module --- ext/session/tests/001.phpt | 27 +++++++++++++++++++++++++++ ext/session/tests/002.phpt | 10 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 ext/session/tests/001.phpt create mode 100644 ext/session/tests/002.phpt diff --git a/ext/session/tests/001.phpt b/ext/session/tests/001.phpt new file mode 100644 index 0000000000..aac17cb3d5 --- /dev/null +++ b/ext/session/tests/001.phpt @@ -0,0 +1,27 @@ +--TEST-- +Session Object Serialization +--FILE-- +yes = "done"; } +} + +$baz = new foo; +$baz->method(); + +$arr[3] = new foo; +$arr[3]->method(); + +session_register("baz"); +session_register("arr"); + +print session_encode()."\n"; + +session_destroy(); +--GET-- +--POST-- +--EXPECT-- +baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";s:4:"done";}} diff --git a/ext/session/tests/002.phpt b/ext/session/tests/002.phpt new file mode 100644 index 0000000000..60ece0dc96 --- /dev/null +++ b/ext/session/tests/002.phpt @@ -0,0 +1,10 @@ +--TEST-- +session_unset() without any session +--FILE-- +