Skip to content

Commit d0a9809

Browse files
authored
Merge pull request #540 from biinari/chore/143-Generic_LowerCaseConstant_separate_parse_error
Generic/LowerCaseConstant: move parse error test to its own file
2 parents 0b67d68 + 0a4e8b9 commit d0a9809

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc renamed to src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.1.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,3 @@ class TypedConstants {
151151

152152
// Global constants can not be typed.
153153
const MYCONST = TRUE;
154-
155-
// Last coding/parse error.
156-
// This has to be the last test in the file.
157-
function UnclosedCurly (): FALSE {

src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc.fixed renamed to src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.1.inc.fixed

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,3 @@ class TypedConstants {
151151

152152
// Global constants can not be typed.
153153
const MYCONST = true;
154-
155-
// Last coding/parse error.
156-
// This has to be the last test in the file.
157-
function UnclosedCurly (): FALSE {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
// Intentional parse error. Testing that the sniff is *not* triggered in this case.
4+
function UnclosedCurly (): FALSE {

src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class LowerCaseConstantUnitTest extends AbstractSniffUnitTest
3333
public function getErrorList($testFile='')
3434
{
3535
switch ($testFile) {
36-
case 'LowerCaseConstantUnitTest.inc':
36+
case 'LowerCaseConstantUnitTest.1.inc':
3737
return [
3838
7 => 1,
3939
10 => 1,

0 commit comments

Comments
 (0)