Spaces:
No application file
No application file
File size: 750 Bytes
d2897cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<?php
namespace Mautic\ReportBundle\Tests\Model;
use Mautic\ReportBundle\Model\ExportResponse;
use Symfony\Component\HttpFoundation\Response;
class ExportResponseTest extends \PHPUnit\Framework\TestCase
{
public function testResponse(): void
{
$responce = new Response();
ExportResponse::setResponseHeaders($responce, 'fileName.csv');
$this->assertSame('application/octet-stream', $responce->headers->get('Content-Type'));
$this->assertSame('attachment; filename="fileName.csv"', $responce->headers->get('Content-Disposition'));
$this->assertSame('must-revalidate, private', $responce->headers->get('Cache-Control'));
$this->assertSame('public', $responce->headers->get('Pragma'));
}
}
|