]> granicus.if.org Git - php/commitdiff
add testcase for bug #29446
authorAntony Dovgal <tony2001@php.net>
Fri, 10 Sep 2004 13:55:26 +0000 (13:55 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 10 Sep 2004 13:55:26 +0000 (13:55 +0000)
tests/classes/bug29446.phpt [new file with mode: 0644]

diff --git a/tests/classes/bug29446.phpt b/tests/classes/bug29446.phpt
new file mode 100644 (file)
index 0000000..5e30e8e
--- /dev/null
@@ -0,0 +1,19 @@
+--TEST--
+Bug #29446 (ZE allows multiple declarations of the same class constant)
+--FILE--
+<?php
+
+class testClass {
+  const TEST_CONST = 'test';
+  const TEST_CONST = 'test1';
+  
+  function testClass() {
+    echo self::TEST_CONST;
+  }
+}
+
+$test = new testClass;
+
+?>
+--EXPECTF--
+Fatal error: Cannot redefine class constant testClass::TEST_CONST in %s on line 5
\ No newline at end of file