Skip to content

Commit

Permalink
Cover base request
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Feb 13, 2024
1 parent ed217c6 commit 094d19c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
configuration: phpunit.xml
memory_limit: 1G
- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: tests/resources/clover.xml
Expand Down
15 changes: 8 additions & 7 deletions tests/Unit/Resources/FulfillmentOutboundResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

/**
* @covers \Jasara\AmznSPA\Resources\FulfillmentOutboundResource
* @covers \Jasara\AmznSPA\DataTransferObjects\Requests\BaseRequest
*/
class FulfillmentOutboundResourceTest extends UnitTestCase
{
Expand Down Expand Up @@ -79,7 +80,7 @@ public function testListAllFulfillmentOrders()

$http->assertSent(function (Request $request) use ($queryStartDate) {
$this->assertEquals('GET', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders?queryStartDate=' . $queryStartDate, $request->url());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders?queryStartDate='.$queryStartDate, $request->url());

return true;
});
Expand Down Expand Up @@ -194,7 +195,7 @@ public function testCreateFulfillmentReturn()

$http->assertSent(function (Request $request) use ($seller_fulfillment_order_id) {
$this->assertEquals('PUT', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/' . $seller_fulfillment_order_id . '/return', urldecode($request->url()));
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/'.$seller_fulfillment_order_id.'/return', urldecode($request->url()));

return true;
});
Expand All @@ -214,7 +215,7 @@ public function testGetFulfillmentOrder()

$http->assertSent(function (Request $request) use ($seller_fulfillment_order_id) {
$this->assertEquals('GET', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/' . $seller_fulfillment_order_id, $request->url());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/'.$seller_fulfillment_order_id, $request->url());

return true;
});
Expand All @@ -237,7 +238,7 @@ public function testUpdateFulfillmentOrder()

$http->assertSent(function (Request $request) use ($seller_fulfillment_order_id) {
$this->assertEquals('PUT', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/' . $seller_fulfillment_order_id, urldecode($request->url()));
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/'.$seller_fulfillment_order_id, urldecode($request->url()));

return true;
});
Expand All @@ -257,7 +258,7 @@ public function testCancelFulfillmentOrder()

$http->assertSent(function (Request $request) use ($seller_fulfillment_order_id) {
$this->assertEquals('PUT', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/' . $seller_fulfillment_order_id . '/cancel', urldecode($request->url()));
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/fulfillmentOrders/'.$seller_fulfillment_order_id.'/cancel', urldecode($request->url()));

return true;
});
Expand Down Expand Up @@ -298,7 +299,7 @@ public function testGetFeatureInventory()

$http->assertSent(function (Request $request) use ($feature_name) {
$this->assertEquals('GET', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/features/inventory/' . $feature_name, $request->url());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/features/inventory/'.$feature_name, $request->url());

return true;
});
Expand All @@ -320,7 +321,7 @@ public function testGetFeatureSku()

$http->assertSent(function (Request $request) use ($feature_name, $seller_sku) {
$this->assertEquals('GET', $request->method());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/features/inventory/' . $feature_name . '/' . $seller_sku, $request->url());
$this->assertEquals('https://sellingpartnerapi-na.amazon.com/fba/outbound/2020-07-01/features/inventory/'.$feature_name.'/'.$seller_sku, $request->url());

return true;
});
Expand Down

0 comments on commit 094d19c

Please sign in to comment.