summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplQueue_setIteratorMode.phpt
blob: 172a1d97a4914cf0dfd84ef70ccba585a1163fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--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