Skip to content

Commit 6feca01

Browse files
committed
Squiz/ForLoopDeclaration: move parse error test to its own file
1 parent 9e017e8 commit 6feca01

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.inc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,3 @@ for (
124124
// body here
125125
}
126126
// phpcs:set Squiz.ControlStructures.ForLoopDeclaration ignoreNewlines false
127-
128-
// This test has to be the last one in the file! Intentional parse error check.
129-
for

src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.inc.fixed

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,3 @@ for (
9090
// body here
9191
}
9292
// phpcs:set Squiz.ControlStructures.ForLoopDeclaration ignoreNewlines false
93-
94-
// This test has to be the last one in the file! Intentional parse error check.
95-
for
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// Parse error/live coding test (no parentheses).
4+
// This test has to be the only test in the file!
5+
// Testing the "NoOpenBracket" warning.
6+
for

src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ public function getErrorList($testFile='')
121121
public function getWarningList($testFile='')
122122
{
123123
switch ($testFile) {
124-
case 'ForLoopDeclarationUnitTest.1.inc':
125-
return [129 => 1];
124+
case 'ForLoopDeclarationUnitTest.2.inc':
125+
return [6 => 1];
126126

127127
case 'ForLoopDeclarationUnitTest.js':
128128
return [125 => 1];

0 commit comments

Comments
 (0)