mirror of
https://github.com/php/php-src.git
synced 2024-10-19 23:44:13 +00:00
21 lines
368 B
Plaintext
21 lines
368 B
Plaintext
|
--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
|
||
|
|