]> granicus.if.org Git - php/commitdiff
- Fix test
authorMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 19:01:40 +0000 (19:01 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 19:01:40 +0000 (19:01 +0000)
Zend/tests/bug28444.phpt
Zend/tests/bug30791.phpt
Zend/tests/bug32290.phpt

index 5d84edc8a9c65d0982dec3bc9d7cba6dd7a1c116..d126612522337d23e6010c3f9fb067b2ce8c0e6f 100755 (executable)
@@ -3,6 +3,12 @@ Bug #28444 (Cannot access undefined property for object with overloaded property
 --FILE--
 <?php
 
+function my_error_handler($errno, $errstr, $errfile, $errline) {
+       var_dump($errstr);
+}
+
+set_error_handler('my_error_handler');
+
 class Object
 {
        public $x;
@@ -60,7 +66,8 @@ Overloaded::__set(y,3)
 int(3)
 Overloaded::__get(y)
 int(3)
-Overloaded::__set(z,Object id #3)
+string(55) "Object of class Object could not be converted to string"
+Overloaded::__set(z,)
 object(Object)#%d (1) {
   ["x"]=>
   int(4)
@@ -83,7 +90,8 @@ Overloaded::__set(y,3)
 int(3)
 Overloaded::__get(y)
 int(3)
-Overloaded::__set(z,Object id #3)
+string(55) "Object of class Object could not be converted to string"
+Overloaded::__set(z,)
 object(Object)#%d (1) {
   [u"x"]=>
   int(4)
index f56bcfb6e7bd1af01f9e525dfead3f43250effa2..556192ad55329cd02a7651fb01f5c451b13cfb31 100755 (executable)
@@ -2,21 +2,33 @@
 Bug #30791 magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded 
 --FILE--
 <?php
-class a {
+
+function my_error_handler($errno, $errstr, $errfile, $errline) {
+       var_dump($errstr);
+}
+
+set_error_handler('my_error_handler');
+
+class a
+{
    public $a = 4;
    function __call($a,$b) {
        return "unknown method";
    }
 }
+
 $b = new a;
 echo $b,"\n";
 $c = unserialize(serialize($b));
 echo $c,"\n";
 var_dump($c);
+
 ?>
 --EXPECT--
-Object id #1
-Object id #2
+string(50) "Object of class a could not be converted to string"
+
+string(50) "Object of class a could not be converted to string"
+
 object(a)#2 (1) {
   ["a"]=>
   int(4)
index f754275ccff490b103083903b2441a5988932c08..7494bbe89b392009a4d6b0f615cf50eaa6c0dbe2 100755 (executable)
@@ -3,6 +3,12 @@ Bug #32290 (calling call_user_func_array() ends in infinite loop within child cl
 --FILE--
 <?php
 
+function my_error_handler($errno, $errstr, $errfile, $errline) {
+       var_dump($errstr);
+}
+
+set_error_handler('my_error_handler');
+
 class TestA
 {
        public function doSomething($i)