diff --git a/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.js b/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.js new file mode 100644 index 0000000..f762590 --- /dev/null +++ b/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.js @@ -0,0 +1,6 @@ +do i++; +while (TRUE); + +do i++; while (i < 5); + +do i++;while(i<5); diff --git a/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.js.fixed b/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.js.fixed new file mode 100644 index 0000000..ae42476 --- /dev/null +++ b/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.js.fixed @@ -0,0 +1,14 @@ +/** + * @file + */ +do { + i++; +} while (TRUE); + +do { + i++; +} while (i < 5); + +do { + i++; +} while (i < 5); diff --git a/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.php b/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.php new file mode 100644 index 0000000..ca73de5 --- /dev/null +++ b/coder_sniffer/Drupal/Test/ControlStructures/ControlSignatureUnitTest.php @@ -0,0 +1,43 @@ + int) + */ + public function getErrorList($testFile) + { + return array( + 1 => 1, + 4 => 1, + 6 => 3, + ); + + }//end getErrorList() + + + /** + * Returns the lines where warnings should occur. + * + * The key of the array should represent the line number and the value + * should represent the number of warnings that should occur on that line. + * + * @return array(int => int) + */ + public function getWarningList($testFile) + { + return array(); + + }//end getWarningList() + + +}//end class