You are here

protected function FunctionTriggerErrorUnitTest::getWarningList in Coder 8.3

Same name and namespace in other branches
  1. 8.3.x tests/Drupal/Semantics/FunctionTriggerErrorUnitTest.php \Drupal\Test\Semantics\FunctionTriggerErrorUnitTest::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/Semantics/FunctionTriggerErrorUnitTest.php, line 54

Class

FunctionTriggerErrorUnitTest

Namespace

Drupal\Test\Semantics

Code

protected function getWarningList(string $testFile) : array {
  switch ($testFile) {
    case 'FunctionTriggerErrorUnitTest.1.inc':
      return [
        44 => 1,
        46 => 1,
        48 => 1,
        50 => 1,
        52 => 1,
        54 => 1,
        56 => 1,
        58 => 1,
        60 => 1,
        62 => 1,
        64 => 1,
        66 => 1,
        68 => 1,
      ];
    case 'FunctionTriggerErrorUnitTest.2.inc':
    case 'FunctionTriggerErrorUnitTest.3.inc':
    default:
      return [];
  }

  //end switch
}