summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt
blob: 2512e23e78277cb63b552db7fed30a245a277523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Doubly Linked List - offsetUnset > number elements
--CREDITS--
PHPNW Test Fest 2009 - Mat Griffin
--FILE--
<?php
$ll = new SplDoublyLinkedList();

$ll->push('1');
$ll->push('2');
$ll->push('3');

try {

$ll->offsetUnset($ll->count() + 1);

var_dump($ll);

} catch(Exception $e) {
echo $e->getMessage();
}

?>
--EXPECT--
Offset out of range