summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-03-09 16:51:02 +0000
committerMarcus Boerger <helly@php.net>2004-03-09 16:51:02 +0000
commit2bdcfe4d0e90404489c91100e0be370e98a42134 (patch)
treea066246289d64c2fcd6d644a5c75d311737af994 /tests
parent50ee116f08e28ec83e23594b9fd5a95fff51d533 (diff)
downloadphp-git-2bdcfe4d0e90404489c91100e0be370e98a42134.tar.gz
Update test
Diffstat (limited to 'tests')
-rw-r--r--tests/classes/constants_scope_001.phpt19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/classes/constants_scope_001.phpt b/tests/classes/constants_scope_001.phpt
index 5dc874872e..50066282ea 100644
--- a/tests/classes/constants_scope_001.phpt
+++ b/tests/classes/constants_scope_001.phpt
@@ -11,15 +11,28 @@ class ErrorCodes {
const INFO = "Informational message\n";
static function print_fatal_error_codes() {
- echo "FATAL = " . FATAL;
+ echo "FATAL = " . FATAL . "\n";
echo "self::FATAL = " . self::FATAL;
}
}
+class ErrorCodesDerived extends ErrorCodes {
+ const FATAL = "Worst error\n";
+ static function print_fatal_error_codes() {
+ echo "self::FATAL = " . self::FATAL;
+ echo "parent::FATAL = " . parent::FATAL;
+ }
+}
+
/* Call the static function and move into the ErrorCodes scope */
ErrorCodes::print_fatal_error_codes();
+ErrorCodesDerived::print_fatal_error_codes();
?>
---EXPECT--
-FATAL = Fatal error
+--EXPECTF--
+
+Notice: Use of undefined constant FATAL - assumed 'FATAL' in %sconstants_scope_001.php on line %d
+FATAL = FATAL
self::FATAL = Fatal error
+self::FATAL = Worst error
+parent::FATAL = Fatal error