From: Marcus Boerger Date: Tue, 9 Mar 2004 16:51:02 +0000 (+0000) Subject: Update test X-Git-Tag: php-5.0.0RC1RC1~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bdcfe4d0e90404489c91100e0be370e98a42134;p=php Update test --- 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