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

Commit 8ab4838

Browse files
authored
Merge pull request #79 from grayloon/cleanup-store-call
fix store call
2 parents b22caf3 + 7fe9570 commit 8ab4838

File tree

4 files changed

+21
-42
lines changed

4 files changed

+21
-42
lines changed

src/Api/Store.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ public function storeConfigs()
1313
{
1414
return $this->get('/store/storeConfigs');
1515
}
16+
17+
/**
18+
* Retrieve list of all websites.
19+
*
20+
* @return array
21+
*/
22+
public function websites()
23+
{
24+
return $this->get('/store/websites');
25+
}
1626
}

src/Api/Stores.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/Api/StoreTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,15 @@ public function test_can_call_store_store_configs()
2323

2424
$this->assertTrue($api->ok());
2525
}
26+
27+
public function test_can_call_stores_websites()
28+
{
29+
Http::fake([
30+
'*rest/all/V1/store/websites*' => Http::response([], 200),
31+
]);
32+
33+
$api = MagentoFacade::api('store')->websites();
34+
35+
$this->assertTrue($api->ok());
36+
}
2637
}

tests/Api/StoresTest.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)