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

PayloadInterfaceRenderTraitTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 4
dl 0
loc 26
rs 10
1
<?php
2
3
namespace Asmaster\EquipTwig\Tests\Traits;
4
5
use Asmaster\EquipTwig\Traits\PayloadInterfaceRenderTrait;
6
use Equip\Adr\PayloadInterface;
7
use Equip\Payload;
8
use PHPUnit_Framework_TestCase as TestCase;
9
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