| 1 | <?php |
||
| 9 | class PayloadRenderTraitTest extends TestCase |
||
| 10 | { |
||
| 11 | use PayloadRenderTrait; |
||
| 12 | |||
| 13 | public function testPayload() |
||
| 14 | { |
||
| 15 | $this->assertInstanceOf(PayloadInterface::class, $this->payload()); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function testPayloadRender() |
||
| 19 | { |
||
| 20 | $template = 'test.html.twig'; |
||
| 21 | $output = [ |
||
| 22 | 'body' => 'body' |
||
| 23 | ]; |
||
| 24 | |||
| 25 | $payload = $this->render($template, $output); |
||
| 26 | |||
| 27 | $this->assertEquals($output, $payload->getOutput()); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |