sniper Thu Sep 15 15:49:58 2005 EDT Modified files: (Branch: PHP_5_1) /ZendEngine2/tests array_type_hint_001.phpt bug20240.phpt bug33996.phpt bug34199.phpt /php-src/tests/classes type_hinting_001.phpt /php-src/tests/lang bug24658.phpt type_hints_001.phpt Log: - Fix tests due to changes in the error messages. # Also nuked some CRLF's http://cvs.php.net/diff.php/ZendEngine2/tests/array_type_hint_001.phpt?r1=1.2&r2=1.2.2.1&ty=u Index: ZendEngine2/tests/array_type_hint_001.phpt diff -u ZendEngine2/tests/array_type_hint_001.phpt:1.2 ZendEngine2/tests/array_type_hint_001.phpt:1.2.2.1 --- ZendEngine2/tests/array_type_hint_001.phpt:1.2 Fri Aug 5 05:34:28 2005 +++ ZendEngine2/tests/array_type_hint_001.phpt Thu Sep 15 15:49:56 2005 @@ -1,15 +1,15 @@ ---TEST-- -Array type hint ---FILE-- -<?php -function foo(array $a) { - echo count($a)."\n"; -} - -foo(array(1,2,3)); -foo(123); -?> ---EXPECTF-- -3 - -Fatal error: Argument 1 must be an array, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 +--TEST-- +Array type hint +--FILE-- +<?php +function foo(array $a) { + echo count($a)."\n"; +} + +foo(array(1,2,3)); +foo(123); +?> +--EXPECTF-- +3 + +Fatal error: Argument 1 passed to foo() must be an array, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 http://cvs.php.net/diff.php/ZendEngine2/tests/bug20240.phpt?r1=1.5&r2=1.5.2.1&ty=u Index: ZendEngine2/tests/bug20240.phpt diff -u ZendEngine2/tests/bug20240.phpt:1.5 ZendEngine2/tests/bug20240.phpt:1.5.2.1 --- ZendEngine2/tests/bug20240.phpt:1.5 Thu Sep 23 16:08:07 2004 +++ ZendEngine2/tests/bug20240.phpt Thu Sep 15 15:49:56 2005 @@ -39,5 +39,5 @@ 2 3 Done -test::__destruct test::destructor +test::__destruct http://cvs.php.net/diff.php/ZendEngine2/tests/bug33996.phpt?r1=1.1&r2=1.1.2.1&ty=u Index: ZendEngine2/tests/bug33996.phpt diff -u ZendEngine2/tests/bug33996.phpt:1.1 ZendEngine2/tests/bug33996.phpt:1.1.2.1 --- ZendEngine2/tests/bug33996.phpt:1.1 Fri Aug 5 05:34:28 2005 +++ ZendEngine2/tests/bug33996.phpt Thu Sep 15 15:49:56 2005 @@ -1,29 +1,29 @@ ---TEST-- -Bug #33996 (No information given for fatal error on passing invalid value to typed argument) ---INI-- -error_reporting=4095 ---FILE-- -<?php -class Foo -{ - // nothing -} - -function FooTest(Foo $foo) -{ - echo "Hello!"; -} - -function NormalTest($a) -{ - echo "Hi!"; -} - -NormalTest(); -FooTest(); -FooTest(new Foo()); -?> ---EXPECTF-- -Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line 17 and defined in %sbug33996.php on line 12 -Hi! -Fatal error: Argument 1 must be an object of class Foo, called in %sbug33996.php on line 18 and defined in %sbug33996.php on line 7 +--TEST-- +Bug #33996 (No information given for fatal error on passing invalid value to typed argument) +--INI-- +error_reporting=4095 +--FILE-- +<?php +class Foo +{ + // nothing +} + +function FooTest(Foo $foo) +{ + echo "Hello!"; +} + +function NormalTest($a) +{ + echo "Hi!"; +} + +NormalTest(); +FooTest(); +FooTest(new Foo()); +?> +--EXPECTF-- +Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line 17 and defined in %sbug33996.php on line 12 +Hi! +Fatal error: Argument 1 passed to FooTest() must be an object of class Foo, called in %sbug33996.php on line 18 and defined in %sbug33996.php on line 7 http://cvs.php.net/diff.php/ZendEngine2/tests/bug34199.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: ZendEngine2/tests/bug34199.phpt diff -u ZendEngine2/tests/bug34199.phpt:1.1.2.2 ZendEngine2/tests/bug34199.phpt:1.1.2.3 --- ZendEngine2/tests/bug34199.phpt:1.1.2.2 Mon Sep 12 07:48:57 2005 +++ ZendEngine2/tests/bug34199.phpt Thu Sep 15 15:49:56 2005 @@ -1,17 +1,18 @@ ---TEST-- -Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler) ---SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> ---FILE-- -<?php -$xml = "<root></root>"; -$xml = simplexml_load_string($xml); -$kids = $xml->children(); -var_dump((bool)$kids); -if($kids) echo "bug\n"; else echo "ok\n"; -if(!$kids) echo "ok\n"; else echo "bug\n"; -?> ---EXPECT-- -bool(false) -ok -ok +--TEST-- +Bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler) +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php +$xml = "<root></root>"; +$xml = simplexml_load_string($xml); +$kids = $xml->children(); +var_dump((bool)$kids); +if($kids) echo "bug\n"; else echo "ok\n"; +if(!$kids) echo "ok\n"; else echo "bug\n"; +?> +--EXPECT-- +bool(false) +ok +ok + http://cvs.php.net/diff.php/php-src/tests/classes/type_hinting_001.phpt?r1=1.3&r2=1.3.2.1&ty=u Index: php-src/tests/classes/type_hinting_001.phpt diff -u php-src/tests/classes/type_hinting_001.phpt:1.3 php-src/tests/classes/type_hinting_001.phpt:1.3.2.1 --- php-src/tests/classes/type_hinting_001.phpt:1.3 Fri Aug 5 05:35:09 2005 +++ php-src/tests/classes/type_hinting_001.phpt Thu Sep 15 15:49:58 2005 @@ -35,4 +35,4 @@ ?> --EXPECTF-- -Fatal error: Argument 1 must implement interface Foo, called in %s on line 27 and defined in %s on line 12 +Fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, called in %s on line 27 and defined in %s on line 12 http://cvs.php.net/diff.php/php-src/tests/lang/bug24658.phpt?r1=1.3&r2=1.3.4.1&ty=u Index: php-src/tests/lang/bug24658.phpt diff -u php-src/tests/lang/bug24658.phpt:1.3 php-src/tests/lang/bug24658.phpt:1.3.4.1 --- php-src/tests/lang/bug24658.phpt:1.3 Sat Aug 16 14:28:20 2003 +++ php-src/tests/lang/bug24658.phpt Thu Sep 15 15:49:58 2005 @@ -53,4 +53,4 @@ object(foo)#%d (0) { } -Fatal error: Argument 1 must be an object of class foo in %s on line %d +Fatal error: Argument 1 passed to typehint() must be an object of class foo in %s on line %d http://cvs.php.net/diff.php/php-src/tests/lang/type_hints_001.phpt?r1=1.3&r2=1.3.2.1&ty=u Index: php-src/tests/lang/type_hints_001.phpt diff -u php-src/tests/lang/type_hints_001.phpt:1.3 php-src/tests/lang/type_hints_001.phpt:1.3.2.1 --- php-src/tests/lang/type_hints_001.phpt:1.3 Fri Aug 5 05:35:09 2005 +++ php-src/tests/lang/type_hints_001.phpt Thu Sep 15 15:49:58 2005 @@ -23,4 +23,4 @@ ?> --EXPECTF-- -Fatal error: Argument 1 must be an instance of Foo, called in %s on line 16 and defined in %s on line 9 +Fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, called in %s on line 16 and defined in %s on line 9
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php