]> granicus.if.org Git - php/commitdiff
- Fix tests
authorMarcus Boerger <helly@php.net>
Wed, 10 May 2006 21:12:31 +0000 (21:12 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 10 May 2006 21:12:31 +0000 (21:12 +0000)
tests/classes/interfaces_003.phpt
tests/classes/tostring_003.phpt

index fa2cb7317f5bb2afbff8eb82a7df327ab2d56545..2c4c7e7c94fe7bce33f8aabdf00a0fe4d5ab4ba7 100755 (executable)
@@ -7,27 +7,20 @@ class MyObject {}
 
 interface MyInterface
 {
-       public function __construct(Object $o);
+       public function __construct(MyObject $o);
 }
 
 class MyTestClass implements MyInterface
 {
-       public function __construct(Object $o)
+       public function __construct(MyObject $o)
        {
        }
 }
 
 $obj = new MyTestClass;
 
-class MyTestFail
-{
-       public function __construct()
-       {
-       }
-}
-
 ?>
 ===DONE===
 --EXPECTF--
 
-Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class Object, called in %sinterfaces_003.php on line %d
+Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class MyObject, called in %sinterfaces_003.php on line %d
index 23a4fe524c402bdfe9ecfe614476062704368814..8815bd9407ff7fb7cb9734be9c40aedd897347c9 100755 (executable)
@@ -1,7 +1,5 @@
 --TEST--
 ZE2 __toString() in __destruct/exception
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
 --FILE--
 <?php
 
@@ -32,4 +30,4 @@ catch(Exception $e)
 ?>
 ====DONE====
 --EXPECTF--
-Fatal error: Object of class Test could not be converted to string in %stostring_003.php on line %d
+Fatal error: Method Test::__toString() must not throw an exception in %stostring_003.php on line %d