summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug60165d.phpt
blob: 26ac927a81736baec4c2d9ccc484c380e68f4c30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
--FILE--
<?php

// The same is true for the insteadof operator to resolve conflicts

trait A {}

trait B {
    public function bar() {}
}

class MyClass {
    use A, B {
        A::bar insteadof B;
    }
}

--EXPECTF--
Fatal error: A precedence rule was defined for A::bar but this method does not exist in %s on line %d