Skip to content

Commit

Permalink
Merge pull request #540 from biinari/chore/143-Generic_LowerCaseConst…
Browse files Browse the repository at this point in the history
…ant_separate_parse_error

Generic/LowerCaseConstant: move parse error test to its own file
  • Loading branch information
jrfnl authored Jul 13, 2024
2 parents 0b67d68 + 0a4e8b9 commit d0a9809
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,3 @@ class TypedConstants {

// Global constants can not be typed.
const MYCONST = TRUE;

// Last coding/parse error.
// This has to be the last test in the file.
function UnclosedCurly (): FALSE {
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,3 @@ class TypedConstants {

// Global constants can not be typed.
const MYCONST = true;

// Last coding/parse error.
// This has to be the last test in the file.
function UnclosedCurly (): FALSE {
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

// Intentional parse error. Testing that the sniff is *not* triggered in this case.
function UnclosedCurly (): FALSE {
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class LowerCaseConstantUnitTest extends AbstractSniffUnitTest
public function getErrorList($testFile='')
{
switch ($testFile) {
case 'LowerCaseConstantUnitTest.inc':
case 'LowerCaseConstantUnitTest.1.inc':
return [
7 => 1,
10 => 1,
Expand Down

0 comments on commit d0a9809

Please sign in to comment.