@@ 53-62 (lines=10) @@ | ||
50 | $this->assertNoViolation(); |
|
51 | } |
|
52 | ||
53 | public function testNullIsInValid() |
|
54 | { |
|
55 | $this->validator->validate(null, new CropFocusCoordinates()); |
|
56 | ||
57 | $this->assertSame( |
|
58 | 1, |
|
59 | $violationsCount = count($this->context->getViolations()), |
|
60 | sprintf('0 violation expected. Got %u.', $violationsCount) |
|
61 | ); |
|
62 | } |
|
63 | ||
64 | public function testFocusIsLargerThanCrop() |
|
65 | { |
|
@@ 64-73 (lines=10) @@ | ||
61 | ); |
|
62 | } |
|
63 | ||
64 | public function testFocusIsLargerThanCrop() |
|
65 | { |
|
66 | $this->validator->validate('10, 20, 80, 90: 9, 21, 79, 90', new CropFocusCoordinates()); |
|
67 | ||
68 | $this->assertSame( |
|
69 | 1, |
|
70 | $violationsCount = count($this->context->getViolations()), |
|
71 | sprintf('0 violation expected. Got %u.', $violationsCount) |
|
72 | ); |
|
73 | } |
|
74 | ||
75 | public function testNoFocusIsSet() |
|
76 | { |
|
@@ 75-85 (lines=11) @@ | ||
72 | ); |
|
73 | } |
|
74 | ||
75 | public function testNoFocusIsSet() |
|
76 | { |
|
77 | // @TODO: We need to allow for no focus to be set |
|
78 | $this->validator->validate('10, 20, 80, 90:', new CropFocusCoordinates()); |
|
79 | ||
80 | $this->assertSame( |
|
81 | 1, |
|
82 | $violationsCount = count($this->context->getViolations()), |
|
83 | sprintf('0 violation expected. Got %u.', $violationsCount) |
|
84 | ); |
|
85 | } |
|
86 | } |