diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-20 15:46:31 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-20 15:47:02 +0200 |
commit | 0c0b955d5f7b1ec19cc303035e194da58c632336 (patch) | |
tree | 6bb00fc0113d005344fbafe3f65d027d579a1a00 /ext/spl/tests | |
parent | 5c59dd0047b9c99d7179a1107adc71f5a7daea44 (diff) | |
parent | eedc060c92e12e054a542dc7156e31cec935a8d6 (diff) | |
download | php-git-0c0b955d5f7b1ec19cc303035e194da58c632336.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
Diffstat (limited to 'ext/spl/tests')
-rw-r--r-- | ext/spl/tests/bug73629.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/spl/tests/bug73629.phpt b/ext/spl/tests/bug73629.phpt new file mode 100644 index 0000000000..5b6587c685 --- /dev/null +++ b/ext/spl/tests/bug73629.phpt @@ -0,0 +1,20 @@ +--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===
|