summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bugs/abstract-methods01.phpt
blob: 5b90ae0f3d97c9ae0706cc596806d3c5b67d5ae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--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