helly Tue Mar 9 11:51:03 2004 EDT
Modified files:
/php-src/tests/classes constants_scope_001.phpt
Log:
Update test
http://cvs.php.net/diff.php/php-src/tests/classes/constants_scope_001.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/tests/classes/constants_scope_001.phpt
diff -u php-src/tests/classes/constants_scope_001.phpt:1.1
php-src/tests/classes/constants_scope_001.phpt:1.2
--- php-src/tests/classes/constants_scope_001.phpt:1.1 Mon Mar 3 11:44:38 2003
+++ php-src/tests/classes/constants_scope_001.phpt Tue Mar 9 11:51:02 2004
@@ -11,15 +11,28 @@
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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php