blob: 9e2a31bbc07aa631497a7f65b521c607a9719955 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--TEST--
SPL: SplPriorityQueue: top exception on empty heap
--CREDITS--
Nathaniel McHugh nat@fishtrap.co.uk
#testfest 2009-05-09
--FILE--
<?php
$priorityQueue = new SplPriorityQueue();
try {
$priorityQueue->top();
} catch (RuntimeException $e) {
echo "Exception: ".$e->getMessage().PHP_EOL;
}
?>
--EXPECT--
Exception: Can't peek at an empty heap
|