File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public function getCommand(): string
1818 $ optionString = implode (' ' , $ this ->options );
1919
2020 return "\"{$ this ->binaryPath }{$ this ->binaryName }\" {$ optionString }"
21- .' -i ' .escapeshellarg ($ this ->imagePath )
22- .' -o ' .escapeshellarg ($ this ->imagePath );
21+ .' ' .escapeshellarg ($ this ->imagePath )
22+ .' --output ' .escapeshellarg ($ this ->imagePath );
2323 }
2424}
Original file line number Diff line number Diff line change 11<?php
22
3+ use Spatie \ImageOptimizer \Optimizers \Gifsicle ;
34use Spatie \ImageOptimizer \Optimizers \Jpegoptim ;
45
56it ('can accept options via the constructor ' , function () {
5253 expect ($ optimizer ->binaryName ())
5354 ->toBe ('jpegoptim ' );
5455});
56+
57+ it ('does not hardcode Gifsicle interlace option ' , function () {
58+ $ optimizer = new Gifsicle ();
59+ $ optimizer ->setImagePath ('my-image.gif ' );
60+ expect ($ optimizer ->getCommand ())->toBe ("\"gifsicle \" 'my-image.gif' --output 'my-image.gif' " );
61+ });
You can’t perform that action at this time.
0 commit comments