Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #79 from grayloon/cleanup-store-call
Browse files Browse the repository at this point in the history
fix store call
  • Loading branch information
ahinkle authored Oct 14, 2021
2 parents b22caf3 + 7fe9570 commit 8ab4838
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 42 deletions.
10 changes: 10 additions & 0 deletions src/Api/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ public function storeConfigs()
{
return $this->get('/store/storeConfigs');
}

/**
* Retrieve list of all websites.
*
* @return array
*/
public function websites()
{
return $this->get('/store/websites');
}
}
16 changes: 0 additions & 16 deletions src/Api/Stores.php

This file was deleted.

11 changes: 11 additions & 0 deletions tests/Api/StoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ public function test_can_call_store_store_configs()

$this->assertTrue($api->ok());
}

public function test_can_call_stores_websites()
{
Http::fake([
'*rest/all/V1/store/websites*' => Http::response([], 200),
]);

$api = MagentoFacade::api('store')->websites();

$this->assertTrue($api->ok());
}
}
26 changes: 0 additions & 26 deletions tests/Api/StoresTest.php

This file was deleted.

0 comments on commit 8ab4838

Please sign in to comment.