public function testDownloadNameOverrideWorks()
{
$content = $this->getCompleteContent();
$routeReference = new RouteReference(ContentDownloadRouteReferenceListener::ROUTE_NAME, [ContentDownloadRouteReferenceListener::OPT_CONTENT => $content, ContentDownloadRouteReferenceListener::OPT_FIELD_IDENTIFIER => 'file', ContentDownloadRouteReferenceListener::OPT_DOWNLOAD_NAME => 'My-custom-filename.pdf']);
$event = new RouteReferenceGenerationEvent($routeReference, new Request());
$eventListener = $this->getListener();
$eventListener->onRouteReferenceGeneration($event);
self::assertEquals('My-custom-filename.pdf', $routeReference->get(ContentDownloadRouteReferenceListener::OPT_DOWNLOAD_NAME));
}