summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplDoublyLinkedList_add_null_offset.phpt
blob: b14c9ab013252500589ae21671e8403741761c12 (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";
}
?>
--EXPECT--
Exception: Offset invalid or out of range