1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 12:45:20 +03:00
aports/community/php7-pecl-igbinary/0001-Update-tests-of-serializing-ArrayObject-for-7.4.6.patch
2020-06-15 02:46:33 +03:00

66 lines
1.6 KiB
Diff

From 07de7a665802ff8e028b85442568031ae9759077 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
---
tests/__serialize_012.phpt | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 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"
}
--
2.26.2