@@ -260,7 +260,11 @@ protected function _copyFileToBaseTmpMediaPath($sourceFile)
260
260
261
261
$ mediaDirectory ->create ($ config ->getBaseTmpMediaPath ());
262
262
$ targetFile = $ config ->getTmpMediaPath (basename ($ sourceFile ));
263
- $ mediaDirectory ->getDriver ()->filePutContents ($ mediaDirectory ->getAbsolutePath ($ targetFile ), file_get_contents ($ sourceFile ));
263
+ $ mediaDirectory ->getDriver ()
264
+ ->filePutContents (
265
+ $ mediaDirectory ->getAbsolutePath ($ targetFile ),
266
+ file_get_contents ($ sourceFile )
267
+ );
264
268
265
269
return $ targetFile ;
266
270
}
@@ -298,36 +302,43 @@ public function testDuplicate()
298
302
299
303
try {
300
304
$ this ->assertNotEquals (
301
- $ customScopeDuplicate ->getId (), $ customScopeProduct ->getId (),
305
+ $ customScopeDuplicate ->getId (),
306
+ $ customScopeProduct ->getId (),
302
307
'Duplicate product Id should not equal to source product Id '
303
308
);
304
309
$ this ->assertNotEquals (
305
- $ customScopeDuplicate ->getSku (), $ customScopeProduct ->getSku (),
310
+ $ customScopeDuplicate ->getSku (),
311
+ $ customScopeProduct ->getSku (),
306
312
'Duplicate product SKU should not equal to source product SKU '
307
313
);
308
314
$ this ->assertNotEquals (
309
- $ customScopeDuplicate ->getShortDescription (), $ defaultScopeDuplicate ->getShortDescription (),
315
+ $ customScopeDuplicate ->getShortDescription (),
316
+ $ defaultScopeDuplicate ->getShortDescription (),
310
317
'Short description of the duplicated product on custom scope should not equal to ' .
311
318
'duplicate product description on default scope '
312
319
);
313
320
$ this ->assertEquals (
314
- $ customScopeProduct ->getShortDescription (), $ customScopeDuplicate ->getShortDescription (),
321
+ $ customScopeProduct ->getShortDescription (),
322
+ $ customScopeDuplicate ->getShortDescription (),
315
323
'Short description of the duplicated product on custom scope should equal to ' .
316
324
'source product description on custom scope '
317
325
);
318
326
$ this ->assertEquals (
319
- $ customScopeProduct ->getStoreId (), $ customScopeDuplicate ->getStoreId (),
327
+ $ customScopeProduct ->getStoreId (),
328
+ $ customScopeDuplicate ->getStoreId (),
320
329
'Store Id of the duplicated product on custom scope should equal to ' .
321
330
'store Id of source product on custom scope '
322
331
);
323
332
$ this ->assertEquals (
324
- $ defaultScopeProduct ->getStoreId (), $ defaultScopeDuplicate ->getStoreId (),
333
+ $ defaultScopeProduct ->getStoreId (),
334
+ $ defaultScopeDuplicate ->getStoreId (),
325
335
'Store Id of the duplicated product on default scope should equal to ' .
326
336
'store Id of source product on default scope '
327
337
);
328
338
329
339
$ this ->assertEquals (
330
- Status::STATUS_DISABLED , $ defaultScopeDuplicate ->getStatus (),
340
+ Status::STATUS_DISABLED ,
341
+ $ defaultScopeDuplicate ->getStatus (),
331
342
'Duplicate should be disabled '
332
343
);
333
344
@@ -886,8 +897,10 @@ public function testSetPriceWithoutTypeId()
886
897
* Tests case for product saving invalidate cache successfully
887
898
*/
888
899
#[
889
- DataFixture(ProductFixture::class,
890
- ['sku ' => 'simple1 ' , 'price ' => 10 , 'page_layout ' => '1column ' ], as: 'product '
900
+ DataFixture(
901
+ ProductFixture::class,
902
+ ['sku ' => 'simple1 ' , 'price ' => 10 , 'page_layout ' => '1column ' ],
903
+ as: 'product '
891
904
),
892
905
]
893
906
public function testSavingProductInAdminWithLayoutChangeWillInvalidateCache ()
@@ -900,9 +913,9 @@ public function testSavingProductInAdminWithLayoutChangeWillInvalidateCache()
900
913
Block::class
901
914
);
902
915
$ cacheKey = sprintf (
903
- '%s ' ,
904
- str_replace ('{{ID}} ' , (string ) $ product ->getId (), Instance::SINGLE_PRODUCT_LAYOUT_HANDLE )
905
- );
916
+ '%s ' ,
917
+ str_replace ('{{ID}} ' , (string )$ product ->getId (), Instance::SINGLE_PRODUCT_LAYOUT_HANDLE )
918
+ );
906
919
907
920
$ product ->setPageLayout ('cms-full-width ' );
908
921
$ this ->productRepository ->save ($ product );
0 commit comments