summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug60165d.phpt
blob: 6b4a09d059d2ff6cf4e6a1c06b6722c8bdc6548e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--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