diff --git a/Zend/tests/bug45910.phpt b/Zend/tests/bug45910.phpt new file mode 100644 index 00000000000..1041877fee3 --- /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 00000000000..90a99758818 --- /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 00000000000..226e147ffdb --- /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 00000000000..c84760be815 --- /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 00000000000..ee62063dafb --- /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