summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug60165c.phpt
blob: 9a8458d65d50d52ac1839d1fa4cf8333a1890ad6 (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

trait A {
    public function bar() {}
}

trait B {
    public function foo() {}
}

class MyClass {
    use A, B {
        foo as fooB;
        baz as foobar;
    }
}
--EXPECTF--
Fatal error: An alias (foobar) was defined for method baz(), but this method does not exist in %s on line %d