summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplDoublyLinkedList_add_null_offset.phpt
blob: 1872436cea63086a51c1ce066608d5f7e08da505 (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([],2));
} catch (TypeError $e) {
    echo "Exception: ".$e->getMessage()."\n";
}
?>
--EXPECT--
Exception: SplDoublyLinkedList::add(): Argument #1 ($index) must be of type int, array given