Patch bug55086.phpt for Scripting Engine problem Bug #55086
Patch version 2011-07-01 20:33 UTC
Return to Bug #55086 |
Download this patch
Patch Revisions:
Developer: pierrick@php.net
Index: Zend/tests/traits/bug55086.phpt
===================================================================
--- Zend/tests/traits/bug55086.phpt (revision 0)
+++ Zend/tests/traits/bug55086.phpt (revision 0)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #55086 (Namespace alias does not work inside trait's use block)
+--FILE--
+<?php
+namespace N1 {
+
+ trait T1 {
+ public function hello() { return 'hello from t1'; }
+ }
+
+ trait T2 {
+ public function hello() { return 'hello from t2'; }
+ }
+
+}
+namespace N2 {
+ use N1\T1;
+ use N1\T2;
+ class A {
+ use T1, T2 {
+ T1::hello insteadof T2;
+ T1::hello as foo;
+ }
+ }
+ $a = new A;
+ echo $a->hello(), PHP_EOL;
+ echo $a->foo(), PHP_EOL;
+ try {
+ } catch(namespace \Foo $e)
+ {
+ }
+}
+?>
+--EXPECT--
+hello from t1
+hello from t1
Property changes on: Zend/tests/traits/bug55086.phpt
___________________________________________________________________
Added: svn:executable
+ *
|