diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-12 11:43:53 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-12 11:43:53 +0100 |
commit | aaebf3b653bc08c10c43120b8c0875c1aa2d5ccc (patch) | |
tree | c0e80d7ca362f2c463768b343786de3eb630321b /tests | |
parent | dbd7fbabe9f0d97b87afec3657ce53b4e5e25b3f (diff) | |
parent | 5297bed4540e25d1d6c8e091bf18d0fa91533fd2 (diff) | |
download | php-git-aaebf3b653bc08c10c43120b8c0875c1aa2d5ccc.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/classes/constants_visibility_002.phpt | 6 | ||||
-rw-r--r-- | tests/classes/constants_visibility_003.phpt | 6 | ||||
-rw-r--r-- | tests/classes/constants_visibility_008.phpt | 12 |
3 files changed, 14 insertions, 10 deletions
diff --git a/tests/classes/constants_visibility_002.phpt b/tests/classes/constants_visibility_002.phpt index 6ec9901269..4e0ecb1aa2 100644 --- a/tests/classes/constants_visibility_002.phpt +++ b/tests/classes/constants_visibility_002.phpt @@ -21,8 +21,4 @@ constant('A::protectedConst'); string(14) "protectedConst" string(14) "protectedConst" -Fatal error: Uncaught Error: Cannot access protected const A::protectedConst in %s:14 -Stack trace: -#0 %s(14): constant('A::protectedCon...') -#1 {main} - thrown in %s on line 14 +Warning: constant(): Couldn't find constant A::protectedConst in %s on line %d diff --git a/tests/classes/constants_visibility_003.phpt b/tests/classes/constants_visibility_003.phpt index 9c7bcfb21c..7c961695ed 100644 --- a/tests/classes/constants_visibility_003.phpt +++ b/tests/classes/constants_visibility_003.phpt @@ -21,8 +21,4 @@ constant('A::privateConst'); string(12) "privateConst" string(12) "privateConst" -Fatal error: Uncaught Error: Cannot access private const A::privateConst in %s:14 -Stack trace: -#0 %s(14): constant('A::privateConst') -#1 {main} - thrown in %s on line 14 +Warning: constant(): Couldn't find constant A::privateConst in %s on line %d diff --git a/tests/classes/constants_visibility_008.phpt b/tests/classes/constants_visibility_008.phpt new file mode 100644 index 0000000000..f24b70cf59 --- /dev/null +++ b/tests/classes/constants_visibility_008.phpt @@ -0,0 +1,12 @@ +--TEST-- +Defined on private constant should not raise exception +--FILE-- +<?php + +class Foo +{ + private const BAR = 1; +} +echo (int)defined('Foo::BAR'); +--EXPECTF-- +0 |