]> granicus.if.org Git - php/commitdiff
Update test
authorMarcus Boerger <helly@php.net>
Tue, 9 Mar 2004 16:51:02 +0000 (16:51 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 9 Mar 2004 16:51:02 +0000 (16:51 +0000)
tests/classes/constants_scope_001.phpt

index 5dc874872e17cb439d31a48d2f436866d5270977..50066282eaa2d1bffc044b00bfd4300f846acd48 100644 (file)
@@ -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