xref: /PHP-8.4/Zend/tests/traits/bug60165c.phpt (revision 7aacc705)
1--TEST--
2Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
3--FILE--
4<?php
5
6trait A {
7    public function bar() {}
8}
9
10trait B {
11    public function foo() {}
12}
13
14class MyClass {
15    use A, B {
16        foo as fooB;
17        baz as foobar;
18    }
19}
20?>
21--EXPECTF--
22Fatal error: An alias (foobar) was defined for method baz(), but this method does not exist in %s on line %d
23