Annotation of embedaddon/php/Zend/tests/traits/error_010.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Trying to exclude trait method multiple times
3: --FILE--
4: <?php
5:
6: trait foo {
7: public function test() { return 3; }
8: }
9: trait c {
10: public function test() { return 2; }
11: }
12:
13: trait b {
14: public function test() { return 1; }
15: }
16:
17: class bar {
18: use foo, c { c::test insteadof foo, b; }
19: use foo, c { c::test insteadof foo, b; }
20: }
21:
22: $x = new bar;
23: var_dump($x->test());
24:
25: ?>
26: --EXPECTF--
27: Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be excluded multiple times in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>