@@ -93,7 +93,7 @@ public function testSetCouponThrowsExceptionIfCouponDoesNotExist()
93
93
94
94
$ serviceInfo = [
95
95
'rest ' => [
96
- 'resourcePath ' => self ::RESOURCE_PATH . $ cartId . '/coupons/ ' . $ couponCode ,
96
+ 'resourcePath ' => self ::RESOURCE_PATH . $ cartId . '/coupons/ ' . urlencode ( $ couponCode) ,
97
97
'httpMethod ' => \Magento \Framework \Webapi \Rest \Request::HTTP_METHOD_PUT ,
98
98
],
99
99
'soap ' => [
@@ -129,7 +129,7 @@ public function testSetCouponSuccess()
129
129
$ couponCode = $ salesRule ->getPrimaryCoupon ()->getCode ();
130
130
$ serviceInfo = [
131
131
'rest ' => [
132
- 'resourcePath ' => self ::RESOURCE_PATH . $ cartId . '/coupons/ ' . $ couponCode ,
132
+ 'resourcePath ' => self ::RESOURCE_PATH . $ cartId . '/coupons/ ' . urlencode ( $ couponCode) ,
133
133
'httpMethod ' => \Magento \Framework \Webapi \Rest \Request::HTTP_METHOD_PUT ,
134
134
],
135
135
'soap ' => [
@@ -232,7 +232,7 @@ public function testSetMyCouponThrowsExceptionIfCouponDoesNotExist()
232
232
233
233
$ serviceInfo = [
234
234
'rest ' => [
235
- 'resourcePath ' => self ::RESOURCE_PATH . 'mine/coupons/ ' . $ couponCode ,
235
+ 'resourcePath ' => self ::RESOURCE_PATH . 'mine/coupons/ ' . urlencode ( $ couponCode) ,
236
236
'httpMethod ' => \Magento \Framework \Webapi \Rest \Request::HTTP_METHOD_PUT ,
237
237
'token ' => $ token ,
238
238
],
@@ -280,7 +280,7 @@ public function testSetMyCouponSuccess()
280
280
281
281
$ serviceInfo = [
282
282
'rest ' => [
283
- 'resourcePath ' => self ::RESOURCE_PATH . 'mine/coupons/ ' . $ couponCode ,
283
+ 'resourcePath ' => self ::RESOURCE_PATH . 'mine/coupons/ ' . urlencode ( $ couponCode) ,
284
284
'httpMethod ' => \Magento \Framework \Webapi \Rest \Request::HTTP_METHOD_PUT ,
285
285
'token ' => $ token ,
286
286
],
0 commit comments