From: David Coallier Date: Wed, 12 Dec 2007 00:34:06 +0000 (+0000) Subject: - Unit test for bug #41528 X-Git-Tag: RELEASE_1_3_1~519 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2196a52edd99308d749e05109b6585bdf41754bf;p=php - Unit test for bug #41528 - Checking that when you serialize a class that extends to ArrayObject Is keeping it's properties. --- diff --git a/ext/spl/tests/bug41528.phpt b/ext/spl/tests/bug41528.phpt new file mode 100644 index 0000000000..6be82c1820 --- /dev/null +++ b/ext/spl/tests/bug41528.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #41528 (Classes extending ArrayObject do not serialize correctly) +--FILE-- +a = 1; + +var_dump($classOne); +var_dump($classOne->a); + +$classOne = unserialize(serialize($classOne)); + +var_dump($classOne); +var_dump($classOne->a); +?> +--EXPECT-- +object(ClassOne)#1 (2) { + ["a"]=> + int(1) + ["storage":"ArrayObject":private]=> + array(0) { + } +} +int(1) +object(ClassOne)#2 (2) { + ["a"]=> + int(1) + ["storage":"ArrayObject":private]=> + array(0) { + } +} +int(1)