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

PayloadRenderTraitTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 21
rs 10
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