summaryrefslogtreecommitdiff
path: root/ext/spl/tests/array_021.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/array_021.phpt')
-rw-r--r--ext/spl/tests/array_021.phpt31
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/spl/tests/array_021.phpt b/ext/spl/tests/array_021.phpt
new file mode 100644
index 0000000..f2ae0c8
--- /dev/null
+++ b/ext/spl/tests/array_021.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SPL: ArrayObject::seek() and exceptions
+--FILE--
+<?php
+
+class foo extends ArrayObject
+{
+ public function seek($key)
+ {
+ echo __METHOD__ . "($key)\n";
+ throw new Exception("hi");
+ }
+}
+
+$test = new foo(array(1,2,3));
+
+try
+{
+ $test->seek('bar');
+}
+catch (Exception $e)
+{
+ echo "got exception\n";
+}
+
+?>
+===DONE===
+--EXPECT--
+foo::seek(bar)
+got exception
+===DONE===