Annotation of embedaddon/php/Zend/tests/traits/bugs/abstract-methods05.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: The compatibility with the signature of abstract methods should be checked.
                      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 THelloB;
                     19:        use THelloA;  
                     20: }
                     21: 
                     22: 
                     23: ?>
                     24: --EXPECTF--    
1.1.1.2 ! misho      25: Fatal error: Declaration of THelloA::hello($a) must be compatible with THelloB::hello() in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>