File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / traits / bugs / abstract-methods05.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.
--FILE--
<?php
error_reporting(E_ALL);

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

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

class TraitsTest1 {
	use THelloB;
	use THelloA;  
}


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

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