Annotation of embedaddon/php/Zend/tests/traits/bugs/abstract-methods06.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: The compatibility with the signature of abstract methods should be checked. (also checking the second possible implementation branch)
3: --FILE--
4: <?php
5: error_reporting(E_ALL);
6:
7: trait THelloB {
8: public function hello() {
9: echo 'Hello';
10: }
11: }
12:
13: trait THelloA {
14: public abstract function hello($a);
15: }
16:
17: class TraitsTest1 {
18: use THelloA;
19: use THelloB;
20: }
21:
22:
23:
24: ?>
25: --EXPECTF--
1.1.1.2 ! misho 26: Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>