Skip to content

Commit

Permalink
test(dim-ratio): update condition where full ratio not provided in te…
Browse files Browse the repository at this point in the history
…st (edge-case)
  • Loading branch information
CamKem committed Aug 14, 2024
1 parent 3602d83 commit 5cabd32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/Validation/ValidationValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5018,9 +5018,11 @@ public function testValidateImageDimensions()
$v = new Validator($trans, ['x' => $uploadedFile], ['x' => 'dimensions:ratio=1']);
$this->assertFalse($v->passes());

// evaluates to (64 / 65) > (1 / 1.0) which is true/fails
$v = new Validator($trans, ['x' => $uploadedFile], ['x' => 'dimensions:min_ratio=1']);
$this->assertFalse($v->passes());
$this->assertFalse($v->fails());

// evaluates to (64 / 65) < (1 / 1.0) which is false/passes
$v = new Validator($trans, ['x' => $uploadedFile], ['x' => 'dimensions:max_ratio=1']);
$this->assertFalse($v->passes());

Expand Down

0 comments on commit 5cabd32

Please sign in to comment.