| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function testResponse() |
||
| 38 | { |
||
| 39 | $template = 'test.html.twig'; |
||
| 40 | $output = [ |
||
| 41 | 'header' => 'header', |
||
| 42 | 'body' => 'body', |
||
| 43 | 'footer' => 'footer' |
||
| 44 | ]; |
||
| 45 | |||
| 46 | $payload = $this->createMock(PayloadInterface::class); |
||
| 47 | $payload->expects($this->any())->method('getOutput')->willReturn($output); |
||
| 48 | $payload->expects($this->any())->method('getSetting')->willReturn($template); |
||
| 49 | |||
| 50 | $body = $this->formatter->body($payload); |
||
| 51 | |||
| 52 | $this->assertEquals("<h1>header</h1>\n<p>body</p>\n<span>footer</span>\n", $body); |
||
| 53 | } |
||
| 54 | } |
||
| 55 |