diff --git a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js similarity index 97% rename from src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js rename to src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js index 3023a644f9..94e1f7484f 100644 --- a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js +++ b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js @@ -120,6 +120,3 @@ for ( // Test with semicolon not belonging to for. for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {} for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);} ; i++) {} - -// This test has to be the last one in the file! Intentional parse error check. -for diff --git a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js.fixed similarity index 97% rename from src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed rename to src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js.fixed index dcfd03bdc2..fbf9b60980 100644 --- a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js.fixed +++ b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.1.js.fixed @@ -86,6 +86,3 @@ for ( i = 0; i < 10; i++ ) {} // Test with semicolon not belonging to for. for (i = function() {self.widgetLoaded(widget.id) ; }; i < function() {self.widgetLoaded(widget.id);}; i++) {} for (i = function() {self.widgetLoaded(widget.id);}; i < function() {self.widgetLoaded(widget.id);}; i++) {} - -// This test has to be the last one in the file! Intentional parse error check. -for diff --git a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.2.js b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.2.js new file mode 100644 index 0000000000..c05d2092eb --- /dev/null +++ b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.2.js @@ -0,0 +1,2 @@ +// Intentional parse error check. Live coding resilience. +for diff --git a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php index 82c653957d..90b29021bb 100644 --- a/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php +++ b/src/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.php @@ -67,7 +67,7 @@ public function getErrorList($testFile='') 116 => 2, ]; - case 'ForLoopDeclarationUnitTest.js': + case 'ForLoopDeclarationUnitTest.1.js': return [ 6 => 2, 9 => 2, @@ -125,8 +125,8 @@ public function getWarningList($testFile='') case 'ForLoopDeclarationUnitTest.3.inc': return [6 => 1]; - case 'ForLoopDeclarationUnitTest.js': - return [125 => 1]; + case 'ForLoopDeclarationUnitTest.2.js': + return [2 => 1]; default: return [];