xref: /PHP-5.4/Zend/tests/traits/conflict003.phpt (revision 1d2a63da)
1--TEST--
2Two methods resulting in a conflict, should be reported both.
3--FILE--
4<?php
5error_reporting(E_ALL);
6
7trait A {
8   public function smallTalk() {
9     echo 'a';
10   }
11   public function bigTalk() {
12     echo 'A';
13   }
14}
15
16trait B {
17   public function smallTalk() {
18     echo 'b';
19   }
20   public function bigTalk() {
21     echo 'B';
22   }
23}
24
25class Talker {
26   use A, B;
27}
28
29?>
30--EXPECTF--
31Fatal error: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d