diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-06-20 17:17:05 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-06-20 17:17:05 +0000 |
commit | 298087c74b9ed8b1962586cc7f3ab3c093878056 (patch) | |
tree | 20d73df057b7ac181d4adc1072b5636464783bf5 /Zend/tests | |
parent | 97cf2a15da955e5a5cfae76979d89bdcf84047a1 (diff) | |
download | php-git-298087c74b9ed8b1962586cc7f3ab3c093878056.tar.gz |
Allowed to override internal classaes with "use"
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/ns_066.phpt | 10 | ||||
-rw-r--r-- | Zend/tests/ns_067.inc | 3 | ||||
-rw-r--r-- | Zend/tests/ns_067.phpt | 9 |
3 files changed, 22 insertions, 0 deletions
diff --git a/Zend/tests/ns_066.phpt b/Zend/tests/ns_066.phpt new file mode 100644 index 0000000000..3a7d9a521f --- /dev/null +++ b/Zend/tests/ns_066.phpt @@ -0,0 +1,10 @@ +--TEST-- +066: Name ambiguity (import name & internal class name) +--FILE-- +<?php +include __DIR__ . '/ns_027.inc'; +use Foo::Bar::Foo as stdClass; + +new stdClass(); +--EXPECT-- +Foo::Bar::Foo diff --git a/Zend/tests/ns_067.inc b/Zend/tests/ns_067.inc new file mode 100644 index 0000000000..09327b276d --- /dev/null +++ b/Zend/tests/ns_067.inc @@ -0,0 +1,3 @@ +<?php +use Foo::Bar::Foo as Test; +new Test(); diff --git a/Zend/tests/ns_067.phpt b/Zend/tests/ns_067.phpt new file mode 100644 index 0000000000..c5096278db --- /dev/null +++ b/Zend/tests/ns_067.phpt @@ -0,0 +1,9 @@ +--TEST-- +067: Name ambiguity (import name & internal class name) +--FILE-- +<?php +include __DIR__ . '/ns_022.inc'; +include __DIR__ . '/ns_027.inc'; +include __DIR__ . '/ns_067.inc'; +--EXPECT-- +Foo::Bar::Foo |