diff --git a/spec/ValueHandler/FileAttributeValueHandlerSpec.php b/spec/ValueHandler/FileAttributeValueHandlerSpec.php index 1a945602..8cda225c 100644 --- a/spec/ValueHandler/FileAttributeValueHandlerSpec.php +++ b/spec/ValueHandler/FileAttributeValueHandlerSpec.php @@ -164,6 +164,7 @@ public function it_save_file_to_media_when_handling_product_variant( $productMediaFileApi->download('path/to/a/file.jpg')->shouldHaveBeenCalled(); $filesystem->mkdir('public/media/attachment/product/path/to/a')->shouldHaveBeenCalled(); $filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled(); + $filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled(); } public function it_skips_files_related_to_channels_that_are_not_associated_to_the_product_and_it_downloads_the_first_file_with_null_scope( @@ -202,7 +203,8 @@ public function it_skips_files_related_to_channels_that_are_not_associated_to_th $productMediaFileApi->download('path/to/a/file.jpg')->shouldHaveBeenCalled(); $filesystem->mkdir('public/media/attachment/product/path/to/a')->shouldHaveBeenCalled(); - $filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled(); + $filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled(); $filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled(); + $filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled(); } public function it_skips_files_related_to_channels_that_are_not_associated_to_the_product_and_it_downloads_the_first_file_with_channel_scope( @@ -242,6 +244,7 @@ public function it_skips_files_related_to_channels_that_are_not_associated_to_th $productMediaFileApi->download('path/to/a/file.jpg')->shouldHaveBeenCalled(); $filesystem->mkdir('public/media/attachment/product/path/to/a')->shouldHaveBeenCalled(); $filesystem->rename(Argument::type('string'), 'public/media/attachment/product/path/to/a/file.jpg', true)->shouldHaveBeenCalled(); + $filesystem->chmod('public/media/attachment/product/path/to/a/file.jpg', 0755)->shouldHaveBeenCalled(); } public function it_throws_when_data_doesnt_contain_scope_info(ProductVariantInterface $productVariant): void