cvs: php-src /tests/reflection 004.phpt invoke.phpt
| From: | Marcus Boerger | Date: | Sun, 13 Feb 2005 13:57:51 +0000 |
| Subject: | cvs: php-src /tests/reflection 004.phpt invoke.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30384@lists.php.net to get a copy of this message | ||
helly Sun Feb 13 08:57:51 2005 EDT
Added files:
/php-src/tests/reflection 004.phpt
Removed files:
/php-src/tests/reflection invoke.phpt
Log:
- Rename
http://cvs.php.net/co.php/php-src/tests/reflection/004.phpt?r=1.1&p=1
Index: php-src/tests/reflection/004.phpt
+++ php-src/tests/reflection/004.phpt
--TEST--
invoke() with non object or null value
--FILE--
<?php
class a {
function a(){
}
}
class b {
}
$b = new b();
$a=new ReflectionClass("a");
$m=$a->getMethod("a");
try {
$m->invoke(null);
} catch (ReflectionException $E) {
echo $E->getMessage()."\n";
}
try {
$m->invoke($b);
} catch (ReflectionException $E) {
echo $E->getMessage()."\n";
}
$b = new a();
try {
$m->invoke($b);
} catch (ReflectionException $E) {
echo $E->getMessage()."\n";
}
echo "===DONE===\n";?>
--EXPECT--
Non-object passed to Invoke()
Given object is not an instance of the class this method was declared in
===DONE===