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

RenderTest::testWithNullVariableExression()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
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