From 078bcec0997ad0e07b720c43cc9e6d0e046a75ab Mon Sep 17 00:00:00 2001 From: SVN Migration Date: Thu, 27 Feb 2003 17:43:39 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'PHP_5'. --- ext/session/tests/001.phpt | 35 --------- ext/session/tests/002.phpt | 13 ---- ext/session/tests/003.phpt | 44 ----------- ext/session/tests/004.phpt | 111 --------------------------- ext/session/tests/005.phpt | 146 ------------------------------------ ext/session/tests/006.phpt | 70 ----------------- ext/session/tests/007.phpt | 59 --------------- ext/session/tests/008-php4.2.3.phpt | 68 ----------------- ext/session/tests/008.phpt | 61 --------------- ext/session/tests/009.phpt | 57 -------------- ext/session/tests/010.phpt | 19 ----- ext/session/tests/011.phpt | 20 ----- ext/session/tests/012.phpt | 34 --------- ext/session/tests/013.phpt | 26 ------- ext/session/tests/014.phpt | 37 --------- ext/session/tests/015.phpt | 24 ------ ext/session/tests/016.phpt | 20 ----- ext/session/tests/017.phpt | 25 ------ ext/session/tests/018.phpt | 24 ------ ext/session/tests/019.phpt | 72 ------------------ ext/session/tests/020.phpt | 25 ------ ext/session/tests/021.phpt | 61 --------------- ext/session/tests/skipif.inc | 10 --- 23 files changed, 1061 deletions(-) delete mode 100644 ext/session/tests/001.phpt delete mode 100644 ext/session/tests/002.phpt delete mode 100644 ext/session/tests/003.phpt delete mode 100644 ext/session/tests/004.phpt delete mode 100644 ext/session/tests/005.phpt delete mode 100644 ext/session/tests/006.phpt delete mode 100644 ext/session/tests/007.phpt delete mode 100644 ext/session/tests/008-php4.2.3.phpt delete mode 100644 ext/session/tests/008.phpt delete mode 100644 ext/session/tests/009.phpt delete mode 100644 ext/session/tests/010.phpt delete mode 100644 ext/session/tests/011.phpt delete mode 100644 ext/session/tests/012.phpt delete mode 100644 ext/session/tests/013.phpt delete mode 100644 ext/session/tests/014.phpt delete mode 100644 ext/session/tests/015.phpt delete mode 100644 ext/session/tests/016.phpt delete mode 100644 ext/session/tests/017.phpt delete mode 100644 ext/session/tests/018.phpt delete mode 100644 ext/session/tests/019.phpt delete mode 100644 ext/session/tests/020.phpt delete mode 100644 ext/session/tests/021.phpt delete mode 100644 ext/session/tests/skipif.inc (limited to 'ext/session/tests') diff --git a/ext/session/tests/001.phpt b/ext/session/tests/001.phpt deleted file mode 100644 index f499029a73..0000000000 --- a/ext/session/tests/001.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -session object serialization ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.serialize_handler=php ---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 deleted file mode 100644 index 7c77fdcf94..0000000000 --- a/ext/session/tests/002.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -session_unset() without a initialized session ---SKIPIF-- - ---FILE-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.serialize_handler=php ---FILE-- -yes++; } -} - -session_id("abtest"); -session_start(); -session_decode('baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:1;}}'); - -$baz->method(); -$arr[3]->method(); - -var_dump($baz); -var_dump($arr); -session_destroy(); ---EXPECT-- -object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) -} -array(1) { - [3]=> - &object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) - } -} diff --git a/ext/session/tests/004.phpt b/ext/session/tests/004.phpt deleted file mode 100644 index 0d930c5307..0000000000 --- a/ext/session/tests/004.phpt +++ /dev/null @@ -1,111 +0,0 @@ ---TEST-- -session_set_save_handler test ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- -data; - } - - function write($key, $val) - { - print "WRITE: $key, $val\n"; - $GLOBALS["hnd"]->data = $val; - return true; - } - - function destroy($key) - { - print "DESTROY: $key\n"; - return true; - } - - function gc() { return true; } -} - -$hnd = new handler; - -class foo { - var $bar = "ok"; - function method() { $this->yes++; } -} - -session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); - -session_id("abtest"); -session_start(); -$baz->method(); -$arr[3]->method(); - -var_dump($baz); -var_dump($arr); - -session_write_close(); - -session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_start(); - -var_dump($baz); -var_dump($arr); - -session_destroy(); -?> ---EXPECT-- -OPEN: PHPSESSID -READ: abtest -object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) -} -array(1) { - [3]=> - &object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) - } -} -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} -OPEN: PHPSESSID -READ: abtest -object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) -} -array(1) { - [3]=> - object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) - } -} -DESTROY: abtest diff --git a/ext/session/tests/005.phpt b/ext/session/tests/005.phpt deleted file mode 100644 index 3c9205277f..0000000000 --- a/ext/session/tests/005.phpt +++ /dev/null @@ -1,146 +0,0 @@ ---TEST-- -custom save handler, multiple session_start()s, complex data structure test. ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- -data; - } - - function write($key, $val) - { - print "WRITE: $key, $val\n"; - $GLOBALS["hnd"]->data = $val; - return true; - } - - function destroy($key) - { - print "DESTROY: $key\n"; - return true; - } - - function gc() { return true; } -} - -$hnd = new handler; - -class foo { - var $bar = "ok"; - function method() { $this->yes++; } -} - -session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); - -session_id("abtest"); -session_start(); -$baz->method(); -$arr[3]->method(); - -var_dump($baz); -var_dump($arr); - -session_write_close(); - -session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_start(); -$baz->method(); -$arr[3]->method(); - - -$c = 123; -session_register("c"); -var_dump($baz); var_dump($arr); var_dump($c); - -session_write_close(); - -session_set_save_handler(array($hnd, "open"), array($hnd, "close"), array($hnd, "read"), array($hnd, "write"), array($hnd, "destroy"), array($hnd, "gc")); -session_start(); -var_dump($baz); var_dump($arr); var_dump($c); - -session_destroy(); -?> ---EXPECT-- -OPEN: PHPSESSID -READ: abtest -object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) -} -array(1) { - [3]=> - &object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(2) - } -} -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:2;}} -CLOSE -OPEN: PHPSESSID -READ: abtest -object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(3) -} -array(1) { - [3]=> - &object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(3) - } -} -int(123) -WRITE: abtest, baz|O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}arr|a:1:{i:3;O:3:"foo":2:{s:3:"bar";s:2:"ok";s:3:"yes";i:3;}}c|i:123; -CLOSE -OPEN: PHPSESSID -READ: abtest -object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(3) -} -array(1) { - [3]=> - object(foo)(2) { - ["bar"]=> - string(2) "ok" - ["yes"]=> - int(3) - } -} -int(123) -DESTROY: abtest -CLOSE diff --git a/ext/session/tests/006.phpt b/ext/session/tests/006.phpt deleted file mode 100644 index 2cdeace074..0000000000 --- a/ext/session/tests/006.phpt +++ /dev/null @@ -1,70 +0,0 @@ ---TEST-- -correct instantiation of references between variables in sessions ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.serialize_handler=php ---FILE-- -a = &$a; - } -} - -$a = new a(); -$b = new b($a); - -echo "original values:\n"; -var_dump($a,$b); - -session_register("a"); -session_register("b"); -session_write_close(); - -session_unregister("a"); -session_unregister("b"); - -session_start(); - -echo "values after session:\n"; -var_dump($a,$b); -?> ---EXPECT-- -original values: -object(a)(1) { - ["test"]=> - string(5) "hallo" -} -object(b)(1) { - ["a"]=> - &object(a)(1) { - ["test"]=> - string(5) "hallo" - } -} -values after session: -object(a)(1) { - ["test"]=> - string(5) "hallo" -} -object(b)(1) { - ["a"]=> - &object(a)(1) { - ["test"]=> - string(5) "hallo" - } -} diff --git a/ext/session/tests/007.phpt b/ext/session/tests/007.phpt deleted file mode 100644 index 7e13ab27e3..0000000000 --- a/ext/session/tests/007.phpt +++ /dev/null @@ -1,59 +0,0 @@ ---TEST-- -bug compatibility: unset($c) with enabled register_globals ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.bug_compat_42=1 -session.serialize_handler=php ---FILE-- - ---EXPECT-- -float(3.14) -array(1) { - ["c"]=> - &float(3.14) -} -float(3.14) -array(1) { - ["c"]=> - &float(3.14) -} diff --git a/ext/session/tests/008-php4.2.3.phpt b/ext/session/tests/008-php4.2.3.phpt deleted file mode 100644 index 2785ddc2e8..0000000000 --- a/ext/session/tests/008-php4.2.3.phpt +++ /dev/null @@ -1,68 +0,0 @@ ---TEST-- -bug compatibility: global is used albeit register_globals=0 ---SKIPIF-- -= 4.2.3"); -?> ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=0 -session.bug_compat_42=1 -session.bug_compat_warn=1 -track_errors=1 -log_errors=0 -html_errors=0 -display_errors=1 -error_reporting=2039; -session.serialize_handler=php ---FILE-- - ---EXPECTF-- -NULL -Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. -array(1) { - ["c"]=> - float(3.14) -} -NULL -array(1) { - ["c"]=> - float(3.14) -} diff --git a/ext/session/tests/008.phpt b/ext/session/tests/008.phpt deleted file mode 100644 index 044a6f2536..0000000000 --- a/ext/session/tests/008.phpt +++ /dev/null @@ -1,61 +0,0 @@ ---TEST-- -bug compatibility: global is used albeit register_globals=0 ---SKIPIF-- -=")) die("skip this is for PHP < 4.2.3"); -?> ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=0 -session.bug_compat_42=1 -session.bug_compat_warn=0 ---FILE-- - ---EXPECT-- -NULL -array(1) { - ["c"]=> - float(3.14) -} -NULL -array(1) { - ["c"]=> - float(3.14) -} diff --git a/ext/session/tests/009.phpt b/ext/session/tests/009.phpt deleted file mode 100644 index a79cb931aa..0000000000 --- a/ext/session/tests/009.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -unset($_SESSION["name"]); should work with register_globals=off ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=0 -session.bug_compat_42=1 -session.bug_compat_warn=0 -session.serialize_handler=php ---FILE-- - ---EXPECT-- -array(0) { -} -array(1) { - ["name"]=> - string(3) "foo" -} -array(1) { - ["name"]=> - string(3) "foo" -} -array(0) { -} -array(0) { -} diff --git a/ext/session/tests/010.phpt b/ext/session/tests/010.phpt deleted file mode 100644 index e1af8ce87f..0000000000 --- a/ext/session/tests/010.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -$session_array = explode(";", session_encode()); should not segfault ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=0 -session.bug_compat_42=1 -session.bug_compat_warn=0 ---FILE-- - ---EXPECT-- -I live diff --git a/ext/session/tests/011.phpt b/ext/session/tests/011.phpt deleted file mode 100644 index 6aaa6bd797..0000000000 --- a/ext/session/tests/011.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -session_decode(); should not segfault ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=0 -session.bug_compat_42=1 -session.bug_compat_warn=0 ---FILE-- - ---EXPECT-- -I live diff --git a/ext/session/tests/012.phpt b/ext/session/tests/012.phpt deleted file mode 100644 index 2bfee9b3de..0000000000 --- a/ext/session/tests/012.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -registering $_SESSION should not segfault ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.bug_compat_42=1 -session.bug_compat_warn=0 -session.serialize_handler=php ---FILE-- - ---EXPECT-- -I live diff --git a/ext/session/tests/013.phpt b/ext/session/tests/013.phpt deleted file mode 100644 index 77c1353054..0000000000 --- a/ext/session/tests/013.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -redefining SID should not cause warnings ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.bug_compat_42=1 -session.bug_compat_warn=0 -session.serialize_handler=php ---FILE-- - ---EXPECT-- -I live diff --git a/ext/session/tests/014.phpt b/ext/session/tests/014.phpt deleted file mode 100644 index 593cfb957d..0000000000 --- a/ext/session/tests/014.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -a script should not be able to modify session.use_trans_sid ---SKIPIF-- - ---INI-- -session.use_trans_sid=1 -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.bug_compat_42=1 -session.bug_compat_warn=0 -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- - - - - - - - ---EXPECT-- - - - diff --git a/ext/session/tests/015.phpt b/ext/session/tests/015.phpt deleted file mode 100644 index 53929b1672..0000000000 --- a/ext/session/tests/015.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -use_trans_sid should not affect SID ---SKIPIF-- - ---INI-- -session.use_trans_sid=1 -session.use_cookies=0 -session.cache_limiter= -arg_separator.output=& -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- - - - ---EXPECT-- - diff --git a/ext/session/tests/016.phpt b/ext/session/tests/016.phpt deleted file mode 100644 index fde3a915a7..0000000000 --- a/ext/session/tests/016.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -invalid session.save_path should not cause a segfault ---SKIPIF-- - ---INI-- -session.save_path="123;:/really\\completely:::/invalid;;,23123;213" -session.use_cookies=0 -session.cache_limiter= -session.serialize_handler=php ---FILE-- - ---EXPECT-- -I live diff --git a/ext/session/tests/017.phpt b/ext/session/tests/017.phpt deleted file mode 100644 index 2a11fed85b..0000000000 --- a/ext/session/tests/017.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -setting $_SESSION before session_start() should not cause segfault ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -session.serialize_handler=php ---FILE-- - ---EXPECT-- -I live diff --git a/ext/session/tests/018.phpt b/ext/session/tests/018.phpt deleted file mode 100644 index 0b84978ed2..0000000000 --- a/ext/session/tests/018.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -rewriter correctly handles attribute names which contain dashes ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -session.use_trans_sid=1 -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- - -
- ---EXPECT-- - diff --git a/ext/session/tests/019.phpt b/ext/session/tests/019.phpt deleted file mode 100644 index c8b969e44f..0000000000 --- a/ext/session/tests/019.phpt +++ /dev/null @@ -1,72 +0,0 @@ ---TEST-- -serializing references test case using globals ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -register_globals=1 -session.serialize_handler=php ---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) - } -} diff --git a/ext/session/tests/020.phpt b/ext/session/tests/020.phpt deleted file mode 100644 index c9571ef20d..0000000000 --- a/ext/session/tests/020.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -rewriter uses arg_seperator.output for modifying URLs ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -session.use_trans_sid=1 -arg_separator.output=& -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- - - - ---EXPECT-- - diff --git a/ext/session/tests/021.phpt b/ext/session/tests/021.phpt deleted file mode 100644 index b45406438e..0000000000 --- a/ext/session/tests/021.phpt +++ /dev/null @@ -1,61 +0,0 @@ ---TEST-- -rewriter handles form and fieldset tags correctly ---SKIPIF-- - ---INI-- -session.use_cookies=0 -session.cache_limiter= -session.use_trans_sid=1 -url_rewriter.tags="a=href,area=href,frame=src,input=src,form=,fieldset=" -session.name=PHPSESSID -session.serialize_handler=php ---FILE-- - - -
- - -
- - -
- - -
- ---EXPECT-- - -
- -
- -
- -
diff --git a/ext/session/tests/skipif.inc b/ext/session/tests/skipif.inc deleted file mode 100644 index 8336e75bd0..0000000000 --- a/ext/session/tests/skipif.inc +++ /dev/null @@ -1,10 +0,0 @@ - -- cgit v1.2.1