php-src/ext/spl/tests/SplStack_setIteratorMode.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

15 lines
369 B
PHP

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