summaryrefslogtreecommitdiff
path: root/tests/classes/interface_constant_inheritance_002.phpt
diff options
context:
space:
mode:
authorRobin Fernandes <robinf@php.net>2008-03-06 11:07:29 +0000
committerRobin Fernandes <robinf@php.net>2008-03-06 11:07:29 +0000
commitf0acfb157d30c109dd2981d512a3609c41f23747 (patch)
treedd8f19cba4c62ef897f160975ecd73486fd6628c /tests/classes/interface_constant_inheritance_002.phpt
parent8e03ac0524b55663d25e734cb40139b4eae068ad (diff)
downloadphp-git-f0acfb157d30c109dd2981d512a3609c41f23747.tar.gz
Add new tests for class/object functions and features.
Diffstat (limited to 'tests/classes/interface_constant_inheritance_002.phpt')
-rw-r--r--tests/classes/interface_constant_inheritance_002.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/classes/interface_constant_inheritance_002.phpt b/tests/classes/interface_constant_inheritance_002.phpt
new file mode 100644
index 0000000000..d5001baa3d
--- /dev/null
+++ b/tests/classes/interface_constant_inheritance_002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Ensure a class may not shadow a constant inherited from an interface.
+--FILE--
+<?php
+interface I {
+ const FOO = 10;
+}
+
+class C implements I {
+ const FOO = 10;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--
+
+Fatal error: Cannot inherit previously-inherited constant FOO from interface I in %s on line 6 \ No newline at end of file