summaryrefslogtreecommitdiff
path: root/ext/spl/tests/SplDoublyLinkedList_serialization.phpt
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /ext/spl/tests/SplDoublyLinkedList_serialization.phpt
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/spl/tests/SplDoublyLinkedList_serialization.phpt')
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_serialization.phpt67
1 files changed, 67 insertions, 0 deletions
diff --git a/ext/spl/tests/SplDoublyLinkedList_serialization.phpt b/ext/spl/tests/SplDoublyLinkedList_serialization.phpt
new file mode 100644
index 0000000..7ab7d78
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_serialization.phpt
@@ -0,0 +1,67 @@
+--TEST--
+Check Serialization/unserialization
+--FILE--
+<?php
+$q = new SplQueue();
+
+$q->enqueue("a");
+$q->enqueue("b");
+
+var_dump($q, $ss = serialize($q), unserialize($ss));
+
+$s = new SplStack();
+
+$s->push("a");
+$s->push("b");
+
+var_dump($s, $ss = serialize($s), unserialize($ss));
+?>
+==END==
+--EXPECTF--
+object(SplQueue)#%d (2) {
+ ["flags":"SplDoublyLinkedList":private]=>
+ int(4)
+ ["dllist":"SplDoublyLinkedList":private]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ }
+}
+string(42) "C:8:"SplQueue":22:{i:4;:s:1:"a";:s:1:"b";}"
+object(SplQueue)#%d (2) {
+ ["flags":"SplDoublyLinkedList":private]=>
+ int(4)
+ ["dllist":"SplDoublyLinkedList":private]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ }
+}
+object(SplStack)#%d (2) {
+ ["flags":"SplDoublyLinkedList":private]=>
+ int(6)
+ ["dllist":"SplDoublyLinkedList":private]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ }
+}
+string(42) "C:8:"SplStack":22:{i:6;:s:1:"a";:s:1:"b";}"
+object(SplStack)#%d (2) {
+ ["flags":"SplDoublyLinkedList":private]=>
+ int(6)
+ ["dllist":"SplDoublyLinkedList":private]=>
+ array(2) {
+ [0]=>
+ string(1) "a"
+ [1]=>
+ string(1) "b"
+ }
+}
+==END==