mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
21 lines
368 B
PHP
21 lines
368 B
PHP
--TEST--
|
|
Check that SplObjectStorage::offsetGet throws exception when non-existing object is requested
|
|
--CREDITS--
|
|
PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
|
|
--FILE--
|
|
<?php
|
|
|
|
$s = new SplObjectStorage();
|
|
$o1 = new stdClass();
|
|
|
|
try {
|
|
$s->offsetGet($o1);
|
|
} catch (UnexpectedValueException $e) {
|
|
echo $e->getMessage();
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Object not found
|
|
|