@@ -314,8 +314,8 @@ public function testProductWithMediaGallery()
314
314
$ testImagePath = __DIR__ . DIRECTORY_SEPARATOR . '_files ' . DIRECTORY_SEPARATOR . 'test_image.jpg ' ;
315
315
$ encodedImage = base64_encode (file_get_contents ($ testImagePath ));
316
316
//create a product with media gallery
317
- $ filename1 = 'tiny1 ' . time ();
318
- $ filename2 = 'tiny2 ' . time ();
317
+ $ filename1 = 'tiny1 ' . time () . ' .jpg ' ;
318
+ $ filename2 = 'tiny2 ' . time () . ' .jpeg ' ;
319
319
$ productData = $ this ->getSimpleProductData ();
320
320
$ productData ['media_gallery_entries ' ] = [
321
321
[
@@ -355,14 +355,14 @@ public function testProductWithMediaGallery()
355
355
'position ' => 1 ,
356
356
'disabled ' => true ,
357
357
'types ' => [],
358
- 'file ' => '/t/i/ ' . $ filename1 . ' .jpg ' ,
358
+ 'file ' => '/t/i/ ' . $ filename1 ,
359
359
],
360
360
[
361
361
'label ' => 'tiny2 ' ,
362
362
'position ' => 2 ,
363
363
'disabled ' => false ,
364
364
'types ' => ['image ' , 'small_image ' ],
365
- 'file ' => '/t/i/ ' . $ filename2 . ' .jpg ' ,
365
+ 'file ' => '/t/i/ ' . $ filename2 ,
366
366
],
367
367
];
368
368
$ this ->assertEquals ($ expectedValue , $ mediaGalleryEntries );
@@ -374,7 +374,7 @@ public function testProductWithMediaGallery()
374
374
'position ' => 1 ,
375
375
'disabled ' => false ,
376
376
'types ' => ['image ' , 'small_image ' ],
377
- 'file ' => '/t/i/ ' . $ filename1 . ' .jpg ' ,
377
+ 'file ' => '/t/i/ ' . $ filename1 ,
378
378
],
379
379
];
380
380
$ response = $ this ->updateProduct ($ response );
@@ -387,7 +387,7 @@ public function testProductWithMediaGallery()
387
387
'position ' => 1 ,
388
388
'disabled ' => false ,
389
389
'types ' => ['image ' , 'small_image ' ],
390
- 'file ' => '/t/i/ ' . $ filename1 . ' .jpg ' ,
390
+ 'file ' => '/t/i/ ' . $ filename1 ,
391
391
]
392
392
];
393
393
$ this ->assertEquals ($ expectedValue , $ mediaGalleryEntries );
0 commit comments