You are here

protected function BadUnitTest::getWarningList in Coder 8.3.x

Same name and namespace in other branches
  1. 8.3 tests/Drupal/bad/BadUnitTest.php \Drupal\Test\bad\BadUnitTest::getWarningList()

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.

Parameters

string $testFile The name of the file being tested.:

Return value

array<int, int>

Overrides CoderSniffUnitTest::getWarningList

File

tests/Drupal/bad/BadUnitTest.php, line 399

Class

BadUnitTest
Unit test class for all bad files.

Namespace

Drupal\Test\bad

Code

protected function getWarningList(string $testFile) : array {
  switch ($testFile) {
    case 'bad.module':
      return [
        7 => 1,
      ];
    case 'bad.php':
      return [
        14 => 1,
        139 => 1,
        151 => 1,
        156 => 1,
        193 => 1,
        202 => 1,
        360 => 1,
        363 => 1,
        366 => 1,
        382 => 1,
        433 => 1,
        434 => 1,
        436 => 1,
        440 => 1,
        460 => 1,
        467 => 1,
        474 => 1,
        485 => 1,
        495 => 1,
        787 => 1,
        788 => 1,
        809 => 1,
        823 => 1,
        824 => 1,
      ];
  }

  //end switch
  return [];
}