]> granicus.if.org Git - php/commitdiff
- Add new test
authorMarcus Boerger <helly@php.net>
Thu, 23 Mar 2006 11:57:15 +0000 (11:57 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 23 Mar 2006 11:57:15 +0000 (11:57 +0000)
ext/spl/tests/array_021.phpt [new file with mode: 0755]

diff --git a/ext/spl/tests/array_021.phpt b/ext/spl/tests/array_021.phpt
new file mode 100755 (executable)
index 0000000..f2ae0c8
--- /dev/null
@@ -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===