xref: /PHP-7.1/Zend/tests/traits/error_015.phpt (revision 1d2a63da)
1--TEST--
2Trying to add an alias to a trait method where there is another with same name.
3Should warn about the conflict.
4--FILE--
5<?php
6
7trait foo {
8	public function test() { return 3; }
9}
10
11trait baz {
12	public function test() { return 4; }
13}
14
15class bar {
16	use foo, baz {
17		baz::test as zzz;
18	}
19}
20
21$x = new bar;
22var_dump($x->test());
23
24?>
25--EXPECTF--
26Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d
27