Skip to content

Commit

Permalink
Fix new mutants
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Apr 3, 2024
1 parent ad7b77c commit 9f96d0e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions tests/Rule/Image/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,26 +172,63 @@ public function dataValidationFailed(): array
],
],
],
'not-exactly-with-custom-message' => [
['a' => __DIR__ . '/16x18.jpg'],
[
'a' => new Image(
width: 24,
height: 32,
notExactWidthMessage: 'Attribute - {attribute}, exactly - {exactly}.',
notExactHeightMessage: 'Attribute - {attribute}, exactly - {exactly}.',
),
],
[
'a' => [
'Attribute - a, exactly - 24.',
'Attribute - a, exactly - 32.',
],
],
],
'too-small-width' => [
__DIR__ . '/16x18.jpg',
new Image(minWidth: 17),
['' => ['The width cannot be smaller than 17 pixels.']],
],
'too-small-width-with-custom-message' => [
['a' => __DIR__ . '/16x18.jpg'],
['a' => new Image(minWidth: 17, tooSmallWidthMessage: 'Attribute - {attribute}, limit - {limit}.')],
['a' => ['Attribute - a, limit - 17.']],
],
'too-small-height' => [
__DIR__ . '/16x18.jpg',
new Image(minHeight: 19),
['' => ['The height cannot be smaller than 19 pixels.']],
],
'too-small-height-with-custom-message' => [
['a' => __DIR__ . '/16x18.jpg'],
['a' => new Image(minHeight: 19, tooSmallHeightMessage: 'Attribute - {attribute}, limit - {limit}.')],
['a' => ['Attribute - a, limit - 19.']],
],
'too-large-width' => [
__DIR__ . '/16x18.jpg',
new Image(maxWidth: 15),
['' => ['The width cannot be larger than 15 pixels.']],
],
'too-large-width-with-custom-message' => [
['a' => __DIR__ . '/16x18.jpg'],
['a' => new Image(maxWidth: 15, tooLargeWidthMessage: 'Attribute - {attribute}, limit - {limit}.')],
['a' => ['Attribute - a, limit - 15.']],
],
'too-large-height' => [
__DIR__ . '/16x18.jpg',
new Image(maxHeight: 17),
['' => ['The height cannot be larger than 17 pixels.']],
],
'too-large-height-with-custom-message' => [
['a' => __DIR__ . '/16x18.jpg'],
['a' => new Image(maxHeight: 17, tooLargeHeightMessage: 'Attribute - {attribute}, limit - {limit}.')],
['a' => ['Attribute - a, limit - 17.']],
],
];
}

Expand Down

0 comments on commit 9f96d0e

Please sign in to comment.