diff options
| author | SVN Migration <svn@php.net> | 2006-04-26 11:08:11 +0000 |
|---|---|---|
| committer | SVN Migration <svn@php.net> | 2006-04-26 11:08:11 +0000 |
| commit | 79f14997b447f5917f16138d00d9877f1eeabae0 (patch) | |
| tree | aac481f9ab3d2192e236780a3c2b5b7fe18e3144 /ext/spl/tests/array_021.phpt | |
| parent | ad1bbaca04a802350884c07e2899a240d1a04e28 (diff) | |
| download | php-git-php-5.1.2.tar.gz | |
This commit was manufactured by cvs2svn to create tag 'php_5_1_2'.php-5.1.2
Diffstat (limited to 'ext/spl/tests/array_021.phpt')
| -rwxr-xr-x | ext/spl/tests/array_021.phpt | 31 |
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 100755 index 0000000000..f2ae0c87e5 --- /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=== |
