php-src/Zend/tests/traits/bugs/abstract-methods01.phpt
Stefan Marr b501570ab0 Added traits test cases. No engine changes for now. [TRAITS]
#Getting accustomed to the infrastructure.
#Any comments are welcome, especially with regard to syntax and keywords.
2010-04-15 21:39:20 +00:00

19 lines
411 B
PHP

--TEST--
Abstract Trait Methods should behave like common abstract methods.
--FILE--
<?php
error_reporting(E_ALL);
trait THello {
public abstract function hello();
}
class TraitsTest {
use THello;
}
$test = new TraitsTest();
$test->hello();
?>
--EXPECTF--
Fatal error: Class %s contains %d abstract method and must therefore be declared abstract or implement the remaining methods (%s) in %s on line %d