summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/conflict003.phpt
blob: e274063a6f112daae0a910264da26f28f80e1c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Two methods resulting in a conflict, should be reported both.
--FILE--
<?php
error_reporting(E_ALL);

trait A {
   public function smallTalk() {
     echo 'a';
   }
   public function bigTalk() {
     echo 'A';
   }
}

trait B {
   public function smallTalk() {
     echo 'b';
   }
   public function bigTalk() {
     echo 'B';
   }
}

class Talker {
   use A, B;
}

?>
--EXPECTF--
Fatal error: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d