summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/conflict003.phpt
blob: 23ab97edc6af777588dac3d11dab9b6562fa7181 (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 B::smallTalk has not been applied as Talker::smallTalk, because of collision with A::smallTalk in %s on line %d