Completed
Push — master ( 1da4a7...53bb89 )
by Alex
02:34
created

PayloadRenderTraitTest::testPayload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Asmaster\EquipTwig\Tests\Traits;
4
5
use PHPUnit_Framework_TestCase as TestCase;
6
use Equip\Adr\PayloadInterface;
7
use Asmaster\EquipTwig\Traits\PayloadRenderTrait;
8
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
        $output = [
21
            'template' => 'index.html.twig',
22
            ['body' => 'body']
23
        ];
24
25
        $payload = $this->render($output['template'], $output);
26
        $this->assertEquals($output, $payload->getOutput());
27
    }
28
}
29