testRenderSetsViewModelAndCallsZendViewRender()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
/**
3
 * MtMail - e-mail module for Zend Framework
4
 *
5
 * @link      http://github.com/mtymek/MtMail
6
 * @copyright Copyright (c) 2013-2017 Mateusz Tymek
7
 * @license   BSD 2-Clause
8
 */
9
10
namespace MtMailTest\Renderer;
11
12
use MtMail\Renderer\ZendView;
13
use PHPUnit\Framework\TestCase;
14
use Zend\View\Model\ViewModel;
15
16
class ZendViewTest extends TestCase
17
{
18
    public function testRenderSetsViewModelAndCallsZendViewRender()
19
    {
20
        $viewModel = $this->prophesize(ViewModel::class);
21
        $viewModel->setOption('has_parent', true)->shouldBeCalled();
22
23
        $view = $this->prophesize(\Zend\View\View::class);
24
        $view->render($viewModel->reveal());
25
26
        $renderer = new ZendView($view->reveal());
27
        $renderer->render($viewModel->reveal());
28
    }
29
}
30