diff options
author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-02-18 21:34:17 -0300 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2018-02-19 08:26:34 +0100 |
commit | 6d785a7a00729bdd046e7ab9d84bd5f2a71e9406 (patch) | |
tree | f6fd8b9afe48bdfcbfa4d3dc9e16805cf6c1663e /ext/spl/tests/SplDoublyLinkedList_top_empty.phpt | |
parent | 34833c9d397dc2eab1a70885d64081e28ac026b0 (diff) | |
download | php-git-6d785a7a00729bdd046e7ab9d84bd5f2a71e9406.tar.gz |
Test more functionalities of SPL
Diffstat (limited to 'ext/spl/tests/SplDoublyLinkedList_top_empty.phpt')
-rw-r--r-- | ext/spl/tests/SplDoublyLinkedList_top_empty.phpt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/spl/tests/SplDoublyLinkedList_top_empty.phpt b/ext/spl/tests/SplDoublyLinkedList_top_empty.phpt new file mode 100644 index 0000000000..644e54bb9a --- /dev/null +++ b/ext/spl/tests/SplDoublyLinkedList_top_empty.phpt @@ -0,0 +1,14 @@ +--TEST-- +SplDoublyLinkedList::top empty +--CREDITS-- +Gabriel Caruso (carusogabriel34@gmail.com) +--FILE-- +<?php +try { + (new SplDoublyLinkedList)->top(); +} catch (RuntimeException $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Can't peek at an empty datastructure |