xref: /PHP-5.3/ext/spl/tests/array_021.phpt (revision 610c7fbe)
1--TEST--
2SPL: ArrayObject::seek() and exceptions
3--FILE--
4<?php
5
6class foo extends ArrayObject
7{
8	public function seek($key)
9	{
10		echo __METHOD__ . "($key)\n";
11		throw new Exception("hi");
12	}
13}
14
15$test = new foo(array(1,2,3));
16
17try
18{
19	$test->seek('bar');
20}
21catch (Exception $e)
22{
23	echo "got exception\n";
24}
25
26?>
27===DONE===
28--EXPECT--
29foo::seek(bar)
30got exception
31===DONE===
32