Skip to content

Commit

Permalink
fix: unit test for upload api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin committed Nov 4, 2023
1 parent a2e0d3b commit 35b703c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/Resources/FulfillmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testCombinePackage()

public function testFulfillmentUploadDeliveryFile()
{
$this->caller->fulfillmentUploadDeliveryFile('file content');
$this->caller->fulfillmentUploadDeliveryFile('php://memory');
$this->assertPreviousRequest('POST', 'fulfillment/'.TestResource::TEST_API_VERSION.'/files/upload');
}

Expand Down Expand Up @@ -138,7 +138,7 @@ public function testUpdatePackageShippingInfo()

public function testFulfillmentUploadDeliveryImage()
{
$this->caller->fulfillmentUploadDeliveryImage('image content');
$this->caller->fulfillmentUploadDeliveryImage('php://memory');
$this->assertPreviousRequest('POST', 'fulfillment/'.TestResource::TEST_API_VERSION.'/images/upload');
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Resources/ProductTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testGetAttributes()

public function testUploadProductImage()
{
$this->caller->uploadProductImage('image data');
$this->caller->uploadProductImage('php://memory');
$this->assertPreviousRequest('POST', 'product/'.TestResource::TEST_API_VERSION.'/images/upload');
}

Expand All @@ -64,7 +64,7 @@ public function testGetProduct()

public function testUploadProductFile()
{
$this->caller->uploadProductFile('file data');
$this->caller->uploadProductFile('php://memory');
$this->assertPreviousRequest('POST', 'product/'.TestResource::TEST_API_VERSION.'/files/upload');
}

Expand Down

0 comments on commit 35b703c

Please sign in to comment.