Completed
Push — master ( c1adf5...002a39 )
by Alex
02:26
created

PayloadRenderTraitTest::testPayloadRender()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Asmaster\EquipTwig\Tests\Traits;
4
5
use Asmaster\EquipTwig\Traits\PayloadRenderTrait;
6
use Equip\Adr\PayloadInterface;
7
use PHPUnit_Framework_TestCase as TestCase;
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
        $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