Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function testSetDifferentFileName() |
||
28 | { |
||
29 | $fileName = 'test.jpg'; |
||
30 | $response = new JpegResponse('some_binary_output', $fileName); |
||
31 | $fileNameFromDispositionRegex = '/.*filename=([^"]+)/'; |
||
32 | |||
33 | $this->assertSame(1, preg_match($fileNameFromDispositionRegex, str_replace('"', '', $response->headers->get('Content-Disposition')), $matches), 1); |
||
34 | |||
35 | $this->assertSame($fileName, $matches[1]); |
||
36 | } |
||
37 | } |
||
38 |