summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/traits-no-forbidden-methods.phpt
blob: 1f310f48cd0c6c3cb589cd261f47b0d161004b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Enum cannot have forbidden methods, even via traits
--FILE--
<?php

trait Rectangle {
    public function __construct() {}
}

enum Suit {
    use Rectangle;

    case Hearts;
    case Diamonds;
    case Clubs;
    case Spades;
}

?>
--EXPECTF--
Fatal error: Enum may not include __construct in %s on line %d