summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/non-backed-enum-with-string-value.phpt
blob: f1a06e1a17a9c5fe75cc6db0ab3cb8bd29b07476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--TEST--
Non-backed enum errors when case has string value
--FILE--
<?php

enum Foo {
    case Bar = 'Bar';
}

?>
--EXPECTF--
Fatal error: Case Bar of non-backed enum Foo must not have a value, try adding ": string" to the enum declaration in %s on line %d