summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplDoublyLinkedList_add_null_offset.phpt
blob: 396f89b491e31c4d395152f94de86c8cd1795afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
Check that SplDoublyLinkedList::add throws an exception with an invalid offset argument
--FILE--
<?php
try {
	$dll = new SplDoublyLinkedList();
	var_dump($dll->add(NULL,2));
} catch (OutOfRangeException $e) {
	echo "Exception: ".$e->getMessage()."\n";
}
?>
--EXPECTF--
Exception: Offset invalid or out of range