function BinaryFileResponseTest::providerTestCalculatedContentType

Data provider of file names and expected content-type values.

File

core/tests/Drupal/KernelTests/Core/Http/BinaryFileResponseTest.php, line 40

Class

BinaryFileResponseTest
Tests the headers added by BinaryFileResponse.

Namespace

Drupal\KernelTests\Core\Http

Code

public static function providerTestCalculatedContentType() : array {
  return [
    [
      'core/misc/print.css',
      'text/css',
    ],
    [
      'core/misc/checkbox.js',
      'text/javascript',
    ],
    [
      'core/misc/tree.png',
      'image/png',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.