Completed
Push — master ( a40ed3...30c58f )
by butschster
23s queued 19s
created

RenderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testWithNullVariable() 0 8 1
A testWithNullVariableExression() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Tests\Framework\Views;
6
7
use Spiral\Tests\Framework\BaseTest;
8
use Spiral\Views\ViewsInterface;
9
10
class RenderTest extends BaseTest
11
{
12
    public function testWithNullVariable(): void
13
    {
14
        $app = $this->makeApp();
15
16
        $out = $app->get(ViewsInterface::class)->render('stempler:null', ['var' => null, 'users' => []]);
17
18
        // any exceptions threw
19
        $this->assertIsString($out);
20
    }
21
22
    public function testWithNullVariableExression(): void
23
    {
24
        $app = $this->makeApp();
25
26
        $out = $app->get(ViewsInterface::class)->render('stempler:null', ['var' => null, 'users' => ['foo']]);
27
28
        // any exceptions threw
29
        $this->assertIsString($out);
30
    }
31
}
32