sas Thu Oct 3 18:54:15 2002 EDT
Added files:
/php4/ext/session/tests 018.phpt 019.phpt
Log:
19: serializing references test case using globals
18: rewriter correctly handles attribute names which contain dashes
Index: php4/ext/session/tests/018.phpt
+++ php4/ext/session/tests/018.phpt
--TEST--
rewriter correctly handles attribute names which contain dashes
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_cookies=0
session.cache_limiter=
session.use_trans_sid=1
--FILE--
<?php
error_reporting(E_ALL);
session_id("abtest");
session_start();
?>
<form accept-charset="ISO-8859-15, ISO-8859-1" action=url.php>
<?php
session_destroy();
?>
--EXPECT--
<form accept-charset="ISO-8859-15, ISO-8859-1" action=url.php><input type="hidden"
name="PHPSESSID" value="abtest" />
Index: php4/ext/session/tests/019.phpt
+++ php4/ext/session/tests/019.phpt
--TEST--
serializing references test case using globals
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_cookies=0
session.cache_limiter=
session.use_trans_sid=1
register_globals=1
--FILE--
<?php
error_reporting(E_ALL);
class TFoo {
var $c;
function TFoo($c) {
$this->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)
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php