@@ -70,14 +70,6 @@ public function testCatalogInventory()
70
70
$ returnedQty = $ stockItemData [self ::KEY_QTY ];
71
71
$ this ->assertEquals ($ qty , $ returnedQty , 'UPDATE 1: Expected qty to be same: ' . $ qty .', ' . $ returnedQty );
72
72
73
- $ customAttributeQty = $ this ->findCustomAttributeQty ();
74
- $ this ->assertTrue (!is_bool ($ customAttributeQty ), 'Expected to find a quantity in the custom attributes ' );
75
- $ this ->assertEquals (
76
- $ qty ,
77
- $ customAttributeQty ,
78
- 'UPDATE 1: Expected custom attribute qty to be updated: ' . $ qty .', ' . $ customAttributeQty
79
- );
80
-
81
73
// update the product without any mention of catalog inventory; no change expected for catalog inventory
82
74
// note: $qty expected to be the same as previously set, above
83
75
$ newPrice = $ this ->getDifferent ($ response [ProductInterface::PRICE ]);
@@ -193,34 +185,6 @@ protected function getDifferent($original)
193
185
return 1 + $ original * $ original ;
194
186
}
195
187
196
- /**
197
- * Returns the product's quantity from the array of custom attributes.
198
- * If no quantity can be found, will return false.
199
- *
200
- * @return int|bool
201
- */
202
- protected function findCustomAttributeQty ()
203
- {
204
- $ qty = false ;
205
- $ qtyAndStockStatus = [];
206
-
207
- if (!empty ($ qtyAndStockStatus ) && is_array ($ qtyAndStockStatus )) {
208
-
209
- if (array_key_exists ('any_type ' , $ qtyAndStockStatus )) {
210
- // for SOAP, need to use the inner array
211
- $ qtyAndStockStatus = $ qtyAndStockStatus ['any_type ' ];
212
- }
213
-
214
- // ex: [true, 1234]
215
- if (is_bool ($ qtyAndStockStatus [0 ]) || is_string ($ qtyAndStockStatus [0 ])) {
216
- $ qty = $ qtyAndStockStatus [1 ];
217
- } else {
218
- $ qty = $ qtyAndStockStatus [0 ];
219
- }
220
- }
221
- return $ qty ;
222
- }
223
-
224
188
/**
225
189
* Get Simple Product Data
226
190
*
0 commit comments