summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bugs/abstract-methods01.phpt
blob: 23cdef3a89fa6aabdb08ae9e19cbdffed9c3eabd (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