You are here

protected function DeprecatedUnitTest::getWarningList in Coder 8.3

Same name and namespace in other branches
  1. 8.3.x tests/Drupal/Commenting/DeprecatedUnitTest.php \Drupal\Test\Commenting\DeprecatedUnitTest::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.

There are two deprecated sniffs which produce a warning: 'DeprecatedVersionFormat' - where the version is written incorrectly. 'DeprecatedWrongSeeUrlFormat' - the url is not to the standard format.

Parameters

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

Return value

array<int, int>

Overrides CoderSniffUnitTest::getWarningList

File

tests/Drupal/Commenting/DeprecatedUnitTest.php, line 60

Class

DeprecatedUnitTest

Namespace

Drupal\Test\Commenting

Code

protected function getWarningList(string $testFile) : array {
  return [
    // Both core versions incorrectly formatted.
    37 => 2,
    // The see url is wrong.
    39 => 1,
    // Both contrib versions incorrectly formatted.
    47 => 2,
    // The see url is wrong.
    49 => 1,
    // Core version incorrectly formatted.
    81 => 1,
  ];
}