Browse Source

Add two regression tests for the session module

PHP-4.0.5
Sascha Schumann 26 years ago
parent
commit
5722a0e1ce
  1. 27
      ext/session/tests/001.phpt
  2. 10
      ext/session/tests/002.phpt

27
ext/session/tests/001.phpt

@ -0,0 +1,27 @@
--TEST--
Session Object Serialization
--FILE--
<?
class foo {
var $bar = "ok";
function method() { $this->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";}}

10
ext/session/tests/002.phpt

@ -0,0 +1,10 @@
--TEST--
session_unset() without any session
--FILE--
<?
session_unset();
print "ok\n";
--GET--
--POST--
--EXPECT--
ok
Loading…
Cancel
Save