Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class BarcodeValidatorSpec extends ObjectBehavior |
||
16 | { |
||
17 | public function let(ExecutionContextInterface $executionContext): void |
||
18 | { |
||
19 | $this->initialize($executionContext); |
||
|
|||
20 | } |
||
21 | |||
22 | public function it_is_initializable(): void |
||
23 | { |
||
24 | $this->shouldHaveType(BarcodeValidator::class); |
||
25 | } |
||
26 | |||
27 | public function it_extends_constraint(): void |
||
28 | { |
||
29 | $this->beAnInstanceOf(Constraint::class); |
||
30 | } |
||
31 | |||
32 | public function it_validates(ExecutionContextInterface $executionContext): void |
||
33 | { |
||
34 | $executionContext->buildViolation(Argument::any())->shouldNotBeCalled(); |
||
35 | $this->validate('4006381333931', new Barcode()); |
||
36 | } |
||
37 | |||
38 | public function it_invalidates(ExecutionContextInterface $executionContext, ConstraintViolationBuilderInterface $constraintViolationBuilder): void |
||
48 | } |
||
49 | } |
||
50 |