summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-03-19 15:15:32 +0000
committerMarcus Boerger <helly@php.net>2005-03-19 15:15:32 +0000
commit6735e8c2a7e52a979616eadf23fdc081315d35ad (patch)
treec0200b691c0b0b99424f0ef980457d046ff4e2f6
parentfec49370525625ba110439c1cf32320e948766bb (diff)
downloadphp-git-6735e8c2a7e52a979616eadf23fdc081315d35ad.tar.gz
- Update test
-rwxr-xr-xext/spl/tests/bug31185.phpt18
1 files changed, 11 insertions, 7 deletions
diff --git a/ext/spl/tests/bug31185.phpt b/ext/spl/tests/bug31185.phpt
index edd90f5b47..b4f315b0b9 100755
--- a/ext/spl/tests/bug31185.phpt
+++ b/ext/spl/tests/bug31185.phpt
@@ -15,6 +15,7 @@ class FooBar implements ArrayAccess {
}
public function offsetSet($index, $value) {
+ echo __METHOD__ . "($index, $value)\n";
$this->array[$index] = $value;
}
@@ -25,11 +26,11 @@ class FooBar implements ArrayAccess {
}
-$i = 0;
+$i = 0; $j = 0;
$foo = new FooBar();
-$foo[$i] = $i++;
-$foo[$i] = $i++;
-$foo[$i] = $i++;
+$foo[$j++] = $i++;
+$foo[$j++] = $i++;
+$foo[$j++] = $i++;
try
{
unset($foo[1]);
@@ -43,14 +44,17 @@ print_R($foo);
?>
===DONE===
--EXPECT--
+FooBar::offsetSet(0, 0)
+FooBar::offsetSet(1, 1)
+FooBar::offsetSet(2, 2)
CAUGHT: FAIL
FooBar Object
(
[array:private] => Array
(
- [1] => 0
- [2] => 1
- [3] => 2
+ [0] => 0
+ [1] => 1
+ [2] => 2
)
)