@@ -57,7 +57,10 @@ public function testAddSimpleProductWithOptions()
57
57
58
58
$ customOptionsValues = $ this ->getCustomOptionsValuesForQueryBySku ->execute ($ sku );
59
59
/* Generate customizable options fragment for GraphQl request */
60
- $ queryCustomizableOptionValues = preg_replace ('/"([^"]+)"\s*:\s*/ ' , '$1: ' , json_encode (array_values ($ customOptionsValues )));
60
+ $ queryCustomizableOptionValues = preg_replace (
61
+ '/"([^"]+)"\s*:\s*/ ' , '$1: ' ,
62
+ json_encode (array_values ($ customOptionsValues ))
63
+ );
61
64
62
65
$ customizableOptions = "customizable_options: {$ queryCustomizableOptionValues }" ;
63
66
$ query = $ this ->getQuery ($ maskedQuoteId , $ sku , $ quantity , $ customizableOptions );
@@ -114,7 +117,10 @@ public function testAddSimpleProductWithWrongDateOptionFormat()
114
117
115
118
$ customOptionsValues = $ this ->getCustomOptionsValuesForQueryBySku ->execute ($ sku );
116
119
$ customOptionsValues ['date ' ]['value_string ' ] = '12-12-12 ' ;
117
- $ queryCustomizableOptionValues = preg_replace ('/"([^"]+)"\s*:\s*/ ' , '$1: ' , json_encode (array_values ($ customOptionsValues )));
120
+ $ queryCustomizableOptionValues = preg_replace (
121
+ '/"([^"]+)"\s*:\s*/ ' , '$1: ' ,
122
+ json_encode (array_values ($ customOptionsValues ))
123
+ );
118
124
$ customizableOptions = "customizable_options: {$ queryCustomizableOptionValues }" ;
119
125
$ query = $ this ->getQuery ($ maskedQuoteId , $ sku , $ quantity , $ customizableOptions );
120
126
@@ -174,7 +180,7 @@ private function getQuery(string $maskedQuoteId, string $sku, float $quantity, s
174
180
*/
175
181
private function buildExpectedValuesArray (string $ assignedValue , string $ type ) : array
176
182
{
177
- if ($ type === 'date ' ){
183
+ if ($ type === 'date ' ) {
178
184
return [['value ' => date ('M d, Y ' , strtotime ($ assignedValue ))]];
179
185
}
180
186
$ assignedOptionsArray = explode (', ' , trim ($ assignedValue , '[] ' ));
0 commit comments