diff options
Diffstat (limited to 'ext/spl/tests/SplStack_setIteratorMode.phpt')
-rw-r--r-- | ext/spl/tests/SplStack_setIteratorMode.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/spl/tests/SplStack_setIteratorMode.phpt b/ext/spl/tests/SplStack_setIteratorMode.phpt new file mode 100644 index 0000000..d70105e --- /dev/null +++ b/ext/spl/tests/SplStack_setIteratorMode.phpt @@ -0,0 +1,15 @@ +--TEST-- +Check that SplStack can't be set to FIFO +--CREDITS-- +Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009 +--FILE-- +<?php +$stack = new SplStack(); +try { + $stack->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO); +} catch (Exception $e) { + echo $e->getMessage(); +} +?> +--EXPECTF-- +Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen |