function ContentDispositionFilenameParserTest::createRequest
Same name in other branches
- 11.x core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php \Drupal\Tests\file\Unit\Upload\ContentDispositionFilenameParserTest::createRequest()
Creates a request with the given content-disposition header.
3 calls to ContentDispositionFilenameParserTest::createRequest()
- ContentDispositionFilenameParserTest::testParseFilenameExtended in core/
modules/ file/ tests/ src/ Unit/ Upload/ ContentDispositionFilenameParserTest.php - @covers ::parseFilename
- ContentDispositionFilenameParserTest::testParseFilenameInvalid in core/
modules/ file/ tests/ src/ Unit/ Upload/ ContentDispositionFilenameParserTest.php - @covers ::parseFilename @dataProvider invalidHeaderProvider
- ContentDispositionFilenameParserTest::testParseFilenameSuccess in core/
modules/ file/ tests/ src/ Unit/ Upload/ ContentDispositionFilenameParserTest.php - Tests the parseFilename() method.
File
-
core/
modules/ file/ tests/ src/ Unit/ Upload/ ContentDispositionFilenameParserTest.php, line 76
Class
- ContentDispositionFilenameParserTest
- Tests the ContentDispositionFilenameParser class.
Namespace
Drupal\Tests\file\Unit\UploadCode
protected function createRequest(string $contentDisposition) : Request {
$request = new Request();
$request->headers
->set('Content-Disposition', $contentDisposition);
return $request;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.