File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / traits / bugs / abstract-methods06.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:17 2013 UTC (11 years ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
The compatibility with the signature of abstract methods should be checked. (also checking the second possible implementation branch)
--FILE--
<?php
error_reporting(E_ALL);

trait THelloB {
  public function hello() {
    echo 'Hello';
  }  
}

trait THelloA {
  public abstract function hello($a);
}

class TraitsTest1 {
	use THelloA;
	use THelloB;
}



?>
--EXPECTF--	
Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d

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