cvs: php-src(PHP_5_1) /ext/spl/tests array_021.phpt
| From: | Marcus Boerger | Date: | Thu, 23 Mar 2006 11:57:34 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/spl/tests array_021.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-37449@lists.php.net to get a copy of this message | ||
helly Thu Mar 23 11:57:34 2006 UTC
Added files: (Branch: PHP_5_1)
/php-src/ext/spl/tests array_021.phpt
Log:
- MFH: Add new test
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/array_021.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/array_021.phpt
+++ php-src/ext/spl/tests/array_021.phpt
--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===