diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-03 12:10:18 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-03 12:10:54 +0100 |
commit | aa9a3ff891a84e19739ac394d32561ff4179d1e5 (patch) | |
tree | 16595f43ee22ec28ec681ef63960942701ec409c /Zend/tests/bug69084.phpt | |
parent | 53efa1b0c69b463ea9d3606d828c036129f2dec9 (diff) | |
download | php-git-aa9a3ff891a84e19739ac394d32561ff4179d1e5.tar.gz |
Add test for bug #69084
This is another bug fixed by the precending commit.
Diffstat (limited to 'Zend/tests/bug69084.phpt')
-rw-r--r-- | Zend/tests/bug69084.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Zend/tests/bug69084.phpt b/Zend/tests/bug69084.phpt new file mode 100644 index 0000000000..2cefcc5432 --- /dev/null +++ b/Zend/tests/bug69084.phpt @@ -0,0 +1,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 |