summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplObjectStorage_offsetGet_missing_object.phpt
blob: 72b032c4ad0cc07a923affd901a051824b6e4172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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