php-src/ext/spl/tests/SplQueue_setIteratorMode.phpt

16 lines
370 B
Plaintext
Raw Normal View History

2009-05-23 15:37:36 +00:00
--TEST--
Check that SplQueue can't be set to LIFO
--CREDITS--
Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
--FILE--
<?php
$queue = new SplQueue();
try {
$queue->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
} catch (Exception $e) {
echo $e->getMessage();
}
?>
--EXPECTF--
Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen