From: Felipe Pena Date: Mon, 25 Aug 2008 19:35:10 +0000 (+0000) Subject: - New tests X-Git-Tag: BEFORE_HEAD_NS_CHANGE~579 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fb9a8e794a6ae5f802e6218f44d9bcb5183a8b2;p=php - New tests --- diff --git a/Zend/tests/bug45910.phpt b/Zend/tests/bug45910.phpt new file mode 100644 index 0000000000..1041877fee --- /dev/null +++ b/Zend/tests/bug45910.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #45910 (Cannot declare self-referencing constant) +--FILE-- + 'a', + self::CCC => 'b', + self::DDD => self::AAA + ); + + public static function test() { + self::$foo; + } +} + +foo::test(); + +print 1; +?> +--EXPECT-- +1 diff --git a/Zend/tests/constants_007.phpt b/Zend/tests/constants_007.phpt new file mode 100644 index 0000000000..90a9975881 --- /dev/null +++ b/Zend/tests/constants_007.phpt @@ -0,0 +1,22 @@ +--TEST-- +Testing const names +--FILE-- + +--EXPECT-- +unicode(1) "a" +unicode(1) "b" +unicode(1) "c" +unicode(1) "d" diff --git a/Zend/tests/constants_008.phpt b/Zend/tests/constants_008.phpt new file mode 100644 index 0000000000..226e147ffd --- /dev/null +++ b/Zend/tests/constants_008.phpt @@ -0,0 +1,17 @@ +--TEST-- +Defining constant twice with two different forms +--FILE-- + +--EXPECTF-- +Notice: Constant a already defined in %s on line %d +2 diff --git a/Zend/tests/constants_009.phpt b/Zend/tests/constants_009.phpt new file mode 100644 index 0000000000..c84760be81 --- /dev/null +++ b/Zend/tests/constants_009.phpt @@ -0,0 +1,23 @@ +--TEST-- +Accessing constants inside namespace +--FILE-- + +--EXPECT-- +int(2) +int(1) +int(1) +bool(true) diff --git a/Zend/tests/inter_007.phpt b/Zend/tests/inter_007.phpt new file mode 100644 index 0000000000..ee62063daf --- /dev/null +++ b/Zend/tests/inter_007.phpt @@ -0,0 +1,20 @@ +--TEST-- +Trying inherit abstract function twice +--FILE-- + +--EXPECTF-- +Fatal error: Can't inherit abstract function c::B() (previously declared abstract in d) in %s on line %d