summaryrefslogtreecommitdiff
path: root/ext/spl/tests/arrayObject_magicMethods2.phpt
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 19:39:21 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 19:39:21 -0400
commit6821b67124604da690c5e9276d5370d679c63ac8 (patch)
treebefb4ca2520eb577950cef6cb76d10b914cbf67a /ext/spl/tests/arrayObject_magicMethods2.phpt
parentcd0b49c72aee33b3e44a9c589fcd93b9e1c7a64f (diff)
downloadphp-6821b67124604da690c5e9276d5370d679c63ac8.tar.gz
Imported Upstream version 5.3.0RC1upstream/5.3.0_RC1upstream/5.3.0RC1
Diffstat (limited to 'ext/spl/tests/arrayObject_magicMethods2.phpt')
-rw-r--r--ext/spl/tests/arrayObject_magicMethods2.phpt231
1 files changed, 127 insertions, 104 deletions
diff --git a/ext/spl/tests/arrayObject_magicMethods2.phpt b/ext/spl/tests/arrayObject_magicMethods2.phpt
index 425108abd..79d972929 100644
--- a/ext/spl/tests/arrayObject_magicMethods2.phpt
+++ b/ext/spl/tests/arrayObject_magicMethods2.phpt
@@ -68,107 +68,130 @@ echo " Wrapping ArrayObject:\n";
var_dump($ao);
?>
--EXPECTF--
-
---> Write existent, non-existent and dynamic:
- Original wrapped object:
-object(UsesMagic)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
- Wrapping ArrayObject:
-object(ArrayObject)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
-
---> Read existent, non-existent and dynamic:
-string(7) "changed"
-
-Notice: Undefined property: ArrayObject::$nonexistent in %s on line 42
-NULL
-string(11) "new.changed"
- Original wrapped object:
-object(UsesMagic)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
- Wrapping ArrayObject:
-object(ArrayObject)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
-
---> isset existent, non-existent and dynamic:
-bool(true)
-bool(false)
-bool(true)
- Original wrapped object:
-object(UsesMagic)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
- Wrapping ArrayObject:
-object(ArrayObject)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
-
---> Unset existent, non-existent and dynamic:
- Original wrapped object:
-object(UsesMagic)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-}
- Wrapping ArrayObject:
-object(ArrayObject)#%d (4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- ["priv:private"]=>
- string(6) "secret"
-} \ No newline at end of file
+--> Write existent, non-existent and dynamic:
+ Original wrapped object:
+object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+}
+ Wrapping ArrayObject:
+object(ArrayObject)#2 (3) {
+ ["a"]=>
+ string(7) "changed"
+ ["dynamic"]=>
+ string(11) "new.changed"
+ ["storage":"ArrayObject":private]=>
+ object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+ }
+}
+
+--> Read existent, non-existent and dynamic:
+string(7) "changed"
+
+Notice: Undefined property: ArrayObject::$nonexistent in %s on line 42
+NULL
+string(11) "new.changed"
+ Original wrapped object:
+object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+}
+ Wrapping ArrayObject:
+object(ArrayObject)#2 (3) {
+ ["a"]=>
+ string(7) "changed"
+ ["dynamic"]=>
+ string(11) "new.changed"
+ ["storage":"ArrayObject":private]=>
+ object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+ }
+}
+
+--> isset existent, non-existent and dynamic:
+bool(true)
+bool(false)
+bool(true)
+ Original wrapped object:
+object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+}
+ Wrapping ArrayObject:
+object(ArrayObject)#2 (3) {
+ ["a"]=>
+ string(7) "changed"
+ ["dynamic"]=>
+ string(11) "new.changed"
+ ["storage":"ArrayObject":private]=>
+ object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+ }
+}
+
+--> Unset existent, non-existent and dynamic:
+ Original wrapped object:
+object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+}
+ Wrapping ArrayObject:
+object(ArrayObject)#2 (1) {
+ ["storage":"ArrayObject":private]=>
+ object(UsesMagic)#1 (4) {
+ ["a"]=>
+ int(1)
+ ["b"]=>
+ int(2)
+ ["c"]=>
+ int(3)
+ ["priv":"UsesMagic":private]=>
+ string(6) "secret"
+ }
+}