cvs: php-src /tests/lang catchable_error_001.phpt catchable_error_002.phpt
| From: | Derick Rethans | Date: | Thu, 15 Sep 2005 16:20:06 +0000 |
| Subject: | cvs: php-src /tests/lang catchable_error_001.phpt catchable_error_002.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-33972@lists.php.net to get a copy of this message | ||
derick Thu Sep 15 12:20:06 2005 EDT
Added files:
/php-src/tests/lang catchable_error_001.phpt
catchable_error_002.phpt
Log:
- Added tests.
http://cvs.php.net/co.php/php-src/tests/lang/catchable_error_001.phpt?r=1.1&p=1
Index: php-src/tests/lang/catchable_error_001.phpt
+++ php-src/tests/lang/catchable_error_001.phpt
--TEST--
Catchable fatal error [1]
--FILE--
<?php
class Foo {
}
function blah (Foo $a)
{
}
function error()
{
$a = func_get_args();
var_dump($a);
}
blah (new StdClass);
echo "ALIVE!\n";
?>
--EXPECTF--
Catchable fatal error: Argument 1 must be an instance of Foo, called in %scatchable_error_001.php on
line 15 and defined in %scatchable_error_001.php on line 5
http://cvs.php.net/co.php/php-src/tests/lang/catchable_error_002.phpt?r=1.1&p=1
Index: php-src/tests/lang/catchable_error_002.phpt
+++ php-src/tests/lang/catchable_error_002.phpt
--TEST--
Catchable fatal error [2]
--FILE--
<?php
class Foo {
}
function blah (Foo $a)
{
}
function error()
{
$a = func_get_args();
var_dump($a);
}
set_error_handler('error');
blah (new StdClass);
echo "ALIVE!\n";
?>
--EXPECTF--
array(5) {
[0]=>
int(4096)
[1]=>
string(%d) "Argument 1 must be an instance of Foo, called in %scatchable_error_002.php on
line 17 and defined"
[2]=>
string(%d) "%scatchable_error_002.php"
[3]=>
int(5)
[4]=>
array(0) {
}
}
ALIVE!