Completed
Pull Request — master (#347)
by Łukasz
17:04
created

GenericBatchElementSpec   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 5 1
A it_is_initializable() 0 4 1
A it_is_delete_element() 0 4 1
A it_is_admin_element() 0 4 1
A it_has_default_route() 0 4 1
1
<?php
2
3
namespace spec\FSi\Bundle\AdminBundle\Admin\CRUD;
4
5
use PhpSpec\ObjectBehavior;
6
use FSi\Bundle\AdminBundle\spec\fixtures\MyBatch;
7
use FSi\Bundle\AdminBundle\Admin\CRUD\GenericBatchElement;
8
use FSi\Bundle\AdminBundle\Admin\CRUD\BatchElement;
9
use FSi\Bundle\AdminBundle\Admin\Element;
10
11
class GenericBatchElementSpec extends ObjectBehavior
12
{
13
    function let()
14
    {
15
        $this->beAnInstanceOf(MyBatch::class);
16
        $this->beConstructedWith([]);
17
    }
18
19
    function it_is_initializable()
20
    {
21
        $this->shouldHaveType(GenericBatchElement::class);
22
    }
23
24
    function it_is_delete_element()
25
    {
26
        $this->shouldHaveType(BatchElement::class);
27
    }
28
29
    function it_is_admin_element()
30
    {
31
        $this->shouldHaveType(Element::class);
32
    }
33
34
    function it_has_default_route()
35
    {
36
        $this->getRoute()->shouldReturn('fsi_admin_batch');
37
    }
38
}
39