Completed
Push — master ( 12ace7...d998d0 )
by Kamil
35:58
created

DashboardControllerSpec::it_renders_dashboard()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace spec\Sylius\Bundle\AdminBundle\Controller;
13
14
use Sylius\Bundle\AdminBundle\Controller\DashboardController;
15
use PhpSpec\ObjectBehavior;
16
use Prophecy\Argument;
17
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
18
use Symfony\Component\HttpFoundation\Request;
19
use Symfony\Component\HttpFoundation\Response;
20
21
/**
22
 * @mixin DashboardController
23
 *
24
 * @author Paweł Jędrzejewski <[email protected]>
25
 */
26
class DashboardControllerSpec extends ObjectBehavior
27
{
28
    function let(EngineInterface $templatingEngine)
29
    {
30
        $this->beConstructedWith($templatingEngine);
31
    }
32
33
    function it_is_initializable()
34
    {
35
        $this->shouldHaveType('Sylius\Bundle\AdminBundle\Controller\DashboardController');
36
    }
37
38
    function it_renders_dashboard(Request $request, EngineInterface $templatingEngine, Response $response)
39
    {
40
        $templatingEngine->renderResponse('SyliusAdminBundle:Dashboard:index.html.twig')->willReturn($response);
41
42
        $this->indexAction($request)->shouldReturn($response);
43
    }
44
}
45