1 | <?php |
||
10 | class PayloadInterfaceRenderTraitTest extends TestCase |
||
11 | { |
||
12 | use PayloadInterfaceRenderTrait; |
||
13 | |||
14 | protected function setUp() |
||
15 | { |
||
16 | $this->payload = new Payload; |
||
17 | } |
||
18 | |||
19 | public function testPayloadInterface() |
||
20 | { |
||
21 | $this->assertInstanceOf(PayloadInterface::class, $this->payload); |
||
22 | } |
||
23 | |||
24 | public function testPayloadInterfaceRender() |
||
25 | { |
||
26 | $template = 'test.html.twig'; |
||
27 | $output = [ |
||
28 | 'body' => 'body' |
||
29 | ]; |
||
30 | |||
31 | $payload = $this->render($template, $output); |
||
32 | |||
33 | $this->assertEquals($output, $payload->getOutput()); |
||
34 | } |
||
35 | } |
||
36 |