summaryrefslogtreecommitdiff
path: root/Zend/tests/bug69084.phpt
blob: 2cefcc54320f1a3c30e0a5ef0c743af80a56eff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Bug #69084: Unclear error message when not implementing a renamed abstract trait function
--FILE--
<?php

trait Foo {
    abstract public function doStuff();

    public function main() {
        $this->doStuff();
    }
}

class Bar {
    use Foo {
        Foo::doStuff as doOtherStuff;
    }

    public function doStuff() {
        var_dump(__FUNCTION__);
    }
}

$b = new Bar();
$b->main();

?>
--EXPECTF--
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doOtherStuff) in %s on line %d