Skip to content

Commit 829c9da

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/UpperCaseConstantName: move parse error test to its own file
1 parent fe50ba7 commit 829c9da

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Standards/Generic/Tests/NamingConventions/UpperCaseConstantNameUnitTest.1.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $foo->getBar()?->define('foo');
3434

3535
// PHP 8.3 introduces typed constants.
3636
class TypedConstants {
37-
const MISSING_VALUE; // Parse error.
37+
3838
const MyClass MYCONST = new MyClass;
3939
const int VALID_NAME = 0;
4040
final public const INT invalid_name = 0;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
// Intentional parse error (missing class constant value).
4+
// This should be the only test in this file.
5+
// Testing that the sniff is *not* triggered.
6+
7+
class TypedConstants {
8+
const MISSING_VALUE;
9+
}

0 commit comments

Comments
 (0)