Completed
Push — refonte ( 64e01a...7173e3 )
by Arnaud
03:31
created

ListResponderTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRespondWithSave() 0 29 1
1
<?php
2
3
namespace LAG\AdminBundle\Tests\AdminBundle\Action\Responder;
4
5
use LAG\AdminBundle\Action\Configuration\ActionConfiguration;
6
use LAG\AdminBundle\Action\Responder\ListResponder;
7
use LAG\AdminBundle\Admin\AdminInterface;
8
use LAG\AdminBundle\Tests\AdminTestBase;
9
use Symfony\Component\Form\FormInterface;
10
use Symfony\Component\HttpFoundation\Response;
11
use Symfony\Component\Routing\RouterInterface;
12
use Twig_Environment;
13
14
class ListResponderTest extends AdminTestBase
15
{
16
    public function testRespondWithSave()
17
    {
18
        $routing = $this->getMockWithoutConstructor(RouterInterface::class);
19
       
20
        $configuration = $this->getMockWithoutConstructor(ActionConfiguration::class);
21
        
22
        $admin = $this->getMockWithoutConstructor(AdminInterface::class);
23
        
24
        $form = $this->getMockWithoutConstructor(FormInterface::class);
25
    
26
        $filterForm = $this->getMockWithoutConstructor(FormInterface::class);
27
        $filterForm
28
            ->expects($this->atLeastOnce())
29
            ->method('createView')
30
        ;
31
        
32
        $twig = $this->getMockWithoutConstructor(Twig_Environment::class);
33
        
34
        $responder = new ListResponder($routing, $twig);
35
        
36
        $response = $responder->respond(
37
            $configuration,
38
            $admin,
39
            $form,
40
            $filterForm
41
        );
42
        
43
        $this->assertInstanceOf(Response::class, $response);
44
    }
45
}
46