function ContentDispositionFilenameParserTest::testParseFilenameMissing
Same name in other branches
- 11.x core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php \Drupal\Tests\file\Unit\Upload\ContentDispositionFilenameParserTest::testParseFilenameMissing()
@covers ::parseFilename
File
-
core/
modules/ file/ tests/ src/ Unit/ Upload/ ContentDispositionFilenameParserTest.php, line 45
Class
- ContentDispositionFilenameParserTest
- Tests the ContentDispositionFilenameParser class.
Namespace
Drupal\Tests\file\Unit\UploadCode
public function testParseFilenameMissing() : void {
$this->expectException(BadRequestHttpException::class);
$this->expectExceptionMessage('"Content-Disposition" header is required. A file name in the format "filename=FILENAME" must be provided.');
$request = new Request();
ContentDispositionFilenameParser::parseFilename($request);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.