ReviewOS

also looking at this

meemalabs/laravel-media-converter

fix: test cases

#25
Merged glennmichael123 wants to merge fix-test-cases into main
2 files +2 -2

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

src/Converters/MediaConvert.phpmodified+1-1
Changes to src/Converters/MediaConvert.php
@@ -117,7 +117,7 @@ class MediaConvert implements Converter
117117 */
118118 public function saveTo(string $s3Path, $s3bucket = null): MediaConvert
119119 {
120 $destination = 's3://'.($s3bucket ?? config('filesystems.disks.s3.bucket')).$s3Path;
120 $destination = 's3://'.($s3bucket ?? config('filesystems.disks.s3.bucket')).'/'.$s3Path;
121121
122122 $this->jobSettings['OutputGroups'][0]['OutputGroupSettings']['FileGroupSettings']['Destination'] = $destination.'/thumbnails/';
123123 $this->jobSettings['OutputGroups'][1]['OutputGroupSettings']['FileGroupSettings']['Destination'] = $destination.'/mp4/';
tests/MediaConverterTest.phpmodified+1-1
Changes to tests/MediaConverterTest.php
@@ -59,7 +59,7 @@ it('can successfully update the output path', function () {
5959 ->withThumbnails(1, 2, 3, 100)
6060 ->saveTo($outputName, $bucket);
6161
62 $destination = 's3://test-bucket';
62 $destination = 's3://test-bucket'.'/'.$outputName;
6363
6464 $this->assertEquals($converter->jobSettings['OutputGroups'][0]['OutputGroupSettings']['FileGroupSettings']['Destination'], $destination.'/thumbnails/');
6565 $this->assertEquals($converter->jobSettings['OutputGroups'][1]['OutputGroupSettings']['FileGroupSettings']['Destination'], $destination.'/mp4/');