Completed
Pull Request — master (#296)
by
unknown
05:01
created

ValidationExceptionSpec::it_has_a_line_number()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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