File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed
dev/tests/api-functional/testsuite/Magento/Quote/Api Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ class ParamOverriderCartId implements ParamOverriderInterface
26
26
*/
27
27
private $ cartManagement ;
28
28
29
+ /**
30
+ * Constructs an object to override the cart ID parameter on a request.
31
+ *
32
+ * @param UserContextInterface $userContext
33
+ * @param CartManagementInterface $cartManagement
34
+ */
29
35
public function __construct (
30
36
UserContextInterface $ userContext ,
31
37
CartManagementInterface $ cartManagement
@@ -34,6 +40,9 @@ public function __construct(
34
40
$ this ->cartManagement = $ cartManagement ;
35
41
}
36
42
43
+ /**
44
+ * {@inheritDoc}
45
+ */
37
46
public function getOverridenValue ()
38
47
{
39
48
try {
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ public function testGetOverridenValueIsCustomerAndCartExists()
69
69
70
70
public function testGetOverridenValueIsCustomerAndCartDoesNotExist ()
71
71
{
72
- $ retValue = 'retValue ' ;
73
72
$ customerId = 1 ;
74
73
75
74
$ this ->userContext ->expects ($ this ->once ())
@@ -79,8 +78,6 @@ public function testGetOverridenValueIsCustomerAndCartDoesNotExist()
79
78
->method ('getUserId ' )
80
79
->will ($ this ->returnValue ($ customerId ));
81
80
82
- $ cart = $ this ->getMockBuilder ('Magento\Quote\Api\Data\CartInterface ' )
83
- ->getMockForAbstractClass ();
84
81
$ this ->cartManagement ->expects ($ this ->once ())
85
82
->method ('getCartForCustomer ' )
86
83
->with ($ customerId )
@@ -91,7 +88,6 @@ public function testGetOverridenValueIsCustomerAndCartDoesNotExist()
91
88
92
89
public function testGetOverridenValueIsCustomerAndCartIsNull ()
93
90
{
94
- $ retValue = 'retValue ' ;
95
91
$ customerId = 1 ;
96
92
97
93
$ this ->userContext ->expects ($ this ->once ())
@@ -101,8 +97,6 @@ public function testGetOverridenValueIsCustomerAndCartIsNull()
101
97
->method ('getUserId ' )
102
98
->will ($ this ->returnValue ($ customerId ));
103
99
104
- $ cart = $ this ->getMockBuilder ('Magento\Quote\Api\Data\CartInterface ' )
105
- ->getMockForAbstractClass ();
106
100
$ this ->cartManagement ->expects ($ this ->once ())
107
101
->method ('getCartForCustomer ' )
108
102
->with ($ customerId )
Original file line number Diff line number Diff line change @@ -19,11 +19,19 @@ class ParamOverriderCustomerId implements ParamOverriderInterface
19
19
*/
20
20
private $ userContext ;
21
21
22
+ /**
23
+ * Constructs an object to override the customer ID parameter on a request.
24
+ *
25
+ * @param UserContextInterface $userContext
26
+ */
22
27
public function __construct (UserContextInterface $ userContext )
23
28
{
24
29
$ this ->userContext = $ userContext ;
25
30
}
26
31
32
+ /**
33
+ * {@inheritDoc}
34
+ */
27
35
public function getOverridenValue ()
28
36
{
29
37
if ($ this ->userContext ->getUserType () === UserContextInterface::USER_TYPE_CUSTOMER ) {
Original file line number Diff line number Diff line change @@ -189,7 +189,6 @@ public function testGetMyTotals()
189
189
/** @var \Magento\Quote\Model\Quote $quote */
190
190
$ quote = $ this ->objectManager ->create ('Magento\Quote\Model\Quote ' );
191
191
$ quote ->load ('test_order_1 ' , 'reserved_order_id ' );
192
- $ cartId = $ quote ->getId ();
193
192
194
193
$ serviceInfo = [
195
194
'rest ' => [
You can’t perform that action at this time.
0 commit comments