xref: /php-src/Zend/tests/bug69084.phpt (revision 3b349db1)
1--TEST--
2Bug #69084: Unclear error message when not implementing a renamed abstract trait function
3--FILE--
4<?php
5
6trait Foo {
7    abstract public function doStuff();
8
9    public function main() {
10        $this->doStuff();
11    }
12}
13
14class Bar {
15    use Foo {
16        Foo::doStuff as doOtherStuff;
17    }
18
19    public function doStuff() {
20        var_dump(__FUNCTION__);
21    }
22}
23
24$b = new Bar();
25$b->main();
26
27?>
28--EXPECTF--
29Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Bar::doOtherStuff) in %s on line %d
30