function ContentDispositionFilenameParserTest::invalidHeaderProvider

Same name in other branches
  1. 11.x core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php \Drupal\Tests\file\Unit\Upload\ContentDispositionFilenameParserTest::invalidHeaderProvider()

A data provider for invalid headers.

File

core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php, line 65

Class

ContentDispositionFilenameParserTest
Tests the ContentDispositionFilenameParser class.

Namespace

Drupal\Tests\file\Unit\Upload

Code

public static function invalidHeaderProvider() : array {
    return [
        'multiple' => [
            'file; filename=""',
        ],
        'empty' => [
            'filename=""',
        ],
        'bad key' => [
            'not_a_filename="example.txt"',
        ],
    ];
}

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