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