summaryrefslogtreecommitdiffstats
path: root/07625b9a51a96d8402fd01b373edd58befa4e3fb.patch
blob: 63a80d4afe5a37630972c42f7e44ad092020fdc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 07625b9a51a96d8402fd01b373edd58befa4e3fb Mon Sep 17 00:00:00 2001
From: Tyson Andre <tysonandre775@hotmail.com>
Date: Wed, 6 May 2020 09:57:04 -0400
Subject: [PATCH] Update tests of serializing ArrayObject for 7.4.6+

Fixes #274
---
 .appveyor.yml              | 12 ++++++------
 tests/__serialize_012.phpt | 20 +++++++++++++++++---
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/tests/__serialize_012.phpt b/tests/__serialize_012.phpt
index 13f1d32..488a87d 100644
--- a/tests/__serialize_012.phpt
+++ b/tests/__serialize_012.phpt
@@ -1,7 +1,7 @@
 --TEST--
 Test unserialization of classes derived from ArrayIterator
 --SKIPIF--
-<?php if (PHP_VERSION_ID < 70400) { echo "Skip requires php 7.4+"; } ?>
+<?php if (PHP_VERSION_ID < 70406) { echo "Skip requires php 7.4.6+"; } ?>
 --FILE--
 <?php
 // based on bug45706.phpt from php-src
@@ -12,13 +12,25 @@ class Foo2 {
 }
 $x = array(new Foo1(),new Foo2);
 $s = igbinary_serialize($x);
+var_dump(igbinary_unserialize($s));
 $s = str_replace("Foo", "Bar", $s);
 $y = igbinary_unserialize($s);
 var_dump($y);
 --EXPECTF--
 array(2) {
   [0]=>
-  object(__PHP_Incomplete_Class)#3 (4) {
+  object(Foo1)#3 (1) {
+    ["storage":"ArrayIterator":private]=>
+    array(0) {
+    }
+  }
+  [1]=>
+  object(Foo2)#4 (0) {
+  }
+}
+array(2) {
+  [0]=>
+  object(__PHP_Incomplete_Class)#4 (5) {
     ["__PHP_Incomplete_Class_Name"]=>
     string(4) "Bar1"
     ["0"]=>
@@ -29,9 +41,11 @@ array(2) {
     ["2"]=>
     array(0) {
     }
+    ["3"]=>
+    NULL
   }
   [1]=>
-  object(__PHP_Incomplete_Class)#4 (1) {
+  object(__PHP_Incomplete_Class)#3 (1) {
     ["__PHP_Incomplete_Class_Name"]=>
     string(4) "Bar2"
   }