You are here

class Drupal_Sniffs_Commenting_FileCommentUnitTest in Coder 7.2

Hierarchy

Expanded class hierarchy of Drupal_Sniffs_Commenting_FileCommentUnitTest

File

coder_sniffer/Test/Commenting/FileCommentUnitTest.php, line 3

View source
class Drupal_Sniffs_Commenting_FileCommentUnitTest extends CoderSniffUnitTest {

  /**
   * Returns the lines where errors should occur.
   *
   * The key of the array should represent the line number and the value
   * should represent the number of errors that should occur on that line.
   *
   * @return array(int => int)
   */
  public function getErrorList($testFile) {
    switch ($testFile) {
      case 'FileCommentUnitTest.inc':
        return array(
          1 => 1,
        );
      case 'FileCommentUnitTest.1.inc':
        return array(
          2 => 1,
        );
    }
  }

  //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();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CoderSniffUnitTest::$phpcs protected static property The PHP_CodeSniffer object used for testing.
CoderSniffUnitTest::generateFailureMessages public function Generate a list of test failures for a given sniffed file.
CoderSniffUnitTest::getSniffCodes protected function Returns a list of sniff codes that should be checked in this test. 2
CoderSniffUnitTest::getTestFiles protected function Returns a list of test files that should be checked. 2
CoderSniffUnitTest::setUp protected function Sets up this unit test.
CoderSniffUnitTest::shouldSkipTest protected function Should this test be skipped for some reason.
CoderSniffUnitTest::testSniff final public function Tests the extending classes Sniff class.
Drupal_Sniffs_Commenting_FileCommentUnitTest::getErrorList public function Returns the lines where errors should occur. Overrides CoderSniffUnitTest::getErrorList
Drupal_Sniffs_Commenting_FileCommentUnitTest::getWarningList public function Returns the lines where warnings should occur. Overrides CoderSniffUnitTest::getWarningList