]> granicus.if.org Git - php/commitdiff
added OO test (will fail currently)
authorAndre Langhorst <waldschrott@php.net>
Wed, 6 Dec 2000 16:22:01 +0000 (16:22 +0000)
committerAndre Langhorst <waldschrott@php.net>
Wed, 6 Dec 2000 16:22:01 +0000 (16:22 +0000)
tests/lang/029.phpt [new file with mode: 0644]

diff --git a/tests/lang/029.phpt b/tests/lang/029.phpt
new file mode 100644 (file)
index 0000000..6226d42
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--
+OO Bug Test (Bug #7515)
+--POST--
+--GET--
+--FILE--
+<?php
+class obj {
+       function method() {}
+    }
+
+function test($o_copy) {
+       $o_copy->root->set_in_copied_o=TRUE;
+       var_dump($o_copy);?><BR><?php }
+
+$o->root=new obj();
+
+ob_start();
+var_dump($o);
+$x=ob_get_contents();
+ob_end_clean();
+
+$o->root->method();
+
+ob_start();
+var_dump($o);
+$y=ob_get_contents();
+ob_end_clean();
+echo ($x==$y) ? 'success':'failure'; ?>
+--EXPECT--
+success