Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
37 | public function testResponse() |
||
38 | { |
||
39 | $output = [ |
||
40 | 'template' => 'index.html.twig', |
||
41 | 'header' => 'header', |
||
42 | 'body' => 'body', |
||
43 | 'footer' => 'footer' |
||
44 | ]; |
||
45 | |||
46 | /** @var PayloadInterface|\PHPUnit_Framework_MockObject_MockObject */ |
||
47 | $payload = $this->getMock(PayloadInterface::class); |
||
48 | $payload |
||
49 | ->expects($this->any()) |
||
50 | ->method('getOutput') |
||
51 | ->will($this->returnValue($output)); |
||
52 | |||
53 | $body = (string) $this->formatter->body($payload); |
||
54 | $this->assertEquals("<h1>header</h1>\n<p>body</p>\n<span>footer</span>\n", $body); |
||
55 | } |
||
56 | } |
||
57 |