ZendViewTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRenderSetsViewModelAndCallsZendViewRender() 0 11 1
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