summaryrefslogtreecommitdiff
path: root/Zend/tests/enum/non-backed-enum-with-int-value.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/enum/non-backed-enum-with-int-value.phpt')
-rw-r--r--Zend/tests/enum/non-backed-enum-with-int-value.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/tests/enum/non-backed-enum-with-int-value.phpt b/Zend/tests/enum/non-backed-enum-with-int-value.phpt
new file mode 100644
index 0000000000..4932e63d18
--- /dev/null
+++ b/Zend/tests/enum/non-backed-enum-with-int-value.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Non-backed enum errors when case has int value
+--FILE--
+<?php
+
+enum Foo {
+ case Bar = 1;
+}
+
+?>
+--EXPECTF--
+Fatal error: Case Bar of non-backed enum Foo must not have a value, try adding ": int" to the enum declaration in %s on line %d