ValidationExceptionSpec   A
last analyzed

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 4 1
A it_is_initializable() 0 4 1
A it_is_an_exception() 0 5 1
A it_has_a_list_of_violations() 0 4 1
A it_has_a_line_number() 0 4 1
1
<?php
2
3
namespace spec\Ddeboer\DataImport\Exception;
4
5
use PhpSpec\ObjectBehavior;
6
use Symfony\Component\Validator\ConstraintViolationListInterface;
7
8
class ValidationExceptionSpec extends ObjectBehavior
9
{
10
    function let(ConstraintViolationListInterface $list)
11
    {
12
        $this->beConstructedWith($list, 1);
13
    }
14
15
    function it_is_initializable()
16
    {
17
        $this->shouldHaveType('Ddeboer\DataImport\Exception\ValidationException');
18
    }
19
20
    function it_is_an_exception()
21
    {
22
        $this->shouldHaveType('Exception');
23
        $this->shouldImplement('Ddeboer\DataImport\Exception');
24
    }
25
26
    function it_has_a_list_of_violations(ConstraintViolationListInterface $list)
27
    {
28
        $this->getViolations()->shouldReturn($list);
29
    }
30
31
    function it_has_a_line_number()
32
    {
33
        $this->getLineNumber()->shouldReturn(1);
34
    }
35
}
36