xref: /php-src/ext/spl/tests/bug73629.phpt (revision a555cc0b)
1--TEST--
2Bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
3--FILE--
4<?php
5$q = new SplQueue();
6try {
7    $q->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
8} catch (Exception $e) {
9    echo 'unexpected exception: ' . $e->getMessage() . "\n";
10}
11try {
12    $q->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
13} catch (Exception $e) {
14    echo 'expected exception: ' . $e->getMessage() . "\n";
15}
16?>
17--EXPECT--
18expected exception: Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen
19