Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function testFormatterEncoding(): void |
||
25 | { |
||
26 | $factory = new Psr17Factory(); |
||
27 | $webResponse = new WebResponse('test', 200, $factory); |
||
28 | $formatter = new HtmlResponseFormatter(); |
||
29 | $formatter->setEncoding('ISO-8859-1'); |
||
30 | $result = $formatter->format($webResponse); |
||
31 | $result->getBody()->rewind(); |
||
32 | |||
33 | $this->assertSame('test', $result->getBody()->getContents()); |
||
34 | $this->assertSame(['text/html; charset=ISO-8859-1'], $result->getHeader('Content-Type')); |
||
35 | } |
||
37 |