Skip to content

Commit d2e4be3

Browse files
committed
fix: use the real amount argument in blur instead of duplicating strength
1 parent 9f25f30 commit d2e4be3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/Transformations/Blur.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static function transform(...$args): array
2020

2121
return [
2222
self::STRENGTH => $strength,
23-
self::AMOUNT => $strength,
23+
self::AMOUNT => $amount,
2424
];
2525
}
2626

‎tests/TransformationTest.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,7 @@
198198
$url = (string) $transformation->stripMeta('sensitive');
199199
expect($url)->toBe('https://ucarecdn.com/12a3456b-c789-1234-1de2-3cfa83096e25/-/strip_meta/sensitive/');
200200
});
201+
202+
it('uses the correct amount argument in blur', function () {
203+
expect((string) uploadcare('12a3456b-c789-1234-1de2-3cfa83096e25')->blur(10, 5))->toContain('-/blur/10/5/');
204+
});

0 commit comments

Comments
 (0)