php-src/ext/spl/tests/SplDoublyLinkedList_add_null_offset.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

14 lines
319 B
PHP

--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