Annotation of embedaddon/php/ext/spl/tests/SplDoublyLinkedList_offsetUnset_negative-parameter.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Check that SplDoublyLinkedList->offsetUnset() returns an error message when the offset is < 0.
3: --CREDITS--
4: PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
5: --FILE--
6: <?php
7: // Create a new Doubly Linked List
8: $dll = new SplDoublyLinkedList();
9:
10: // Add some items to the list
11: $dll->push(1);
12: $dll->push(2);
13: $dll->push(3);
14:
15: try {
16: $dll->offsetUnset(-1);
17: }
18: catch (Exception $e) {
19: echo $e->getMessage() . "\n";
20: }
21: ?>
22: --EXPECT--
23: Offset out of range
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>