This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,18 @@ public function mine()
1616 return $ this ->get ('/carts/mine ' );
1717 }
1818
19+ /**
20+ * Returns information for the cart for the authenticated customer. Must have a store code.
21+ *
22+ * @return array
23+ */
24+ public function create ()
25+ {
26+ $ this ->validateSingleStoreCode ();
27+
28+ return $ this ->post ('/carts/mine ' );
29+ }
30+
1931 /**
2032 * Estimate shipping by address and return list of available shipping methods.
2133 *
Original file line number Diff line number Diff line change @@ -112,6 +112,17 @@ public function test_can_call_carts_payment_information()
112112 $ this ->assertTrue ($ api ->ok ());
113113 }
114114
115+ public function test_can_call_cart_mine_create ()
116+ {
117+ Http::fake ([
118+ '*rest/default/V1/carts/mine ' => Http::response ('foo ' , 200 ),
119+ ]);
120+
121+ $ api = MagentoFacade::setStoreCode ('default ' )->api ('carts ' )->create ();
122+
123+ $ this ->assertTrue ($ api ->ok ());
124+ }
125+
115126 public function test_must_pass_a_single_store_code_to_payment_information ()
116127 {
117128 $ this ->expectException ('exception ' );
You can’t perform that action at this time.
0 commit comments