1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/spl/tests/bug73629.phpt
Christoph M. Becker eedc060c92 Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
We must not overwrite the SPL_DLLIST_IT_FIX flag when changing the
iterator mode.
2017-09-20 15:46:04 +02:00

21 lines
565 B
PHP

--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";
}
?>
===DONE===
--EXPECTF--
expected exception: Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen
===DONE===