summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-11-09 13:34:58 +0000
committerDmitry Stogov <dmitry@php.net>2007-11-09 13:34:58 +0000
commit4d681d5660a772e0684d8df7d9c601645431b9c1 (patch)
tree2c16699aaa138fd8b79731c953bb53ce85ee48f7 /Zend
parent8646d9afce989718cde927c526684bbbc1c96e97 (diff)
downloadphp-git-4d681d5660a772e0684d8df7d9c601645431b9c1.tar.gz
new test
Diffstat (limited to 'Zend')
-rwxr-xr-xZend/tests/ns_055.phpt33
1 files changed, 33 insertions, 0 deletions
diff --git a/Zend/tests/ns_055.phpt b/Zend/tests/ns_055.phpt
new file mode 100755
index 0000000000..83d0613c1e
--- /dev/null
+++ b/Zend/tests/ns_055.phpt
@@ -0,0 +1,33 @@
+--TEST--
+055: typehints in namespaces
+--FILE--
+<?php
+namespace test::ns1;
+
+class Foo {
+ function test1(Foo $x) {
+ echo "ok\n";
+ }
+ function test2(test::ns1::Foo $x) {
+ echo "ok\n";
+ }
+ function test3(Exception $x) {
+ echo "ok\n";
+ }
+ function test4(::Exception $x) {
+ echo "ok\n";
+ }
+}
+
+$foo = new Foo();
+$ex = new Exception();
+$foo->test1($foo);
+$foo->test2($foo);
+$foo->test3($ex);
+$foo->test4($ex);
+?>
+--EXPECT--
+ok
+ok
+ok
+ok