@@ -21,7 +21,6 @@ class ProductRepositoryInterfaceTest extends WebapiAbstract
21
21
const KEY_QTY = StockStatusInterface::QTY ;
22
22
const KEY_ITEM_ID = 'item_id ' ;
23
23
const KEY_PRODUCT_ID = StockStatusInterface::PRODUCT_ID ;
24
- const KEY_WEBSITE_ID = StockStatusInterface::WEBSITE_ID ;
25
24
const KEY_CUSTOM_ATTRIBUTES = 'custom_attributes ' ;
26
25
const KEY_ATTRIBUTE_CODE = \Magento \Eav \Api \Data \AttributeInterface::ATTRIBUTE_CODE ;
27
26
const CODE_QUANTITY_AND_STOCK_STATUS = 'quantity_and_stock_status ' ;
@@ -38,7 +37,6 @@ public function testCatalogInventory()
38
37
$ productData = $ this ->getSimpleProductData ($ qty );
39
38
$ stockItemData = $ this ->getStockItemData ($ qty );
40
39
$ this ->assertArrayNotHasKey (self ::KEY_ITEM_ID , $ stockItemData );
41
- $ this ->assertArrayNotHasKey (self ::KEY_WEBSITE_ID , $ stockItemData );
42
40
$ this ->assertArrayNotHasKey (self ::KEY_PRODUCT_ID , $ stockItemData );
43
41
$ productData [self ::KEY_EXTENSION_ATTRIBUTES ] = $ stockItemData ;
44
42
@@ -51,7 +49,6 @@ public function testCatalogInventory()
51
49
$ this ->assertEquals ($ qty , $ returnedQty , 'CREATE: Expected qty to be same: ' . $ qty .', ' . $ returnedQty );
52
50
$ this ->assertArrayHasKey (self ::KEY_ITEM_ID , $ stockItemData );
53
51
$ this ->assertArrayHasKey (self ::KEY_PRODUCT_ID , $ stockItemData );
54
- $ this ->assertArrayHasKey (self ::KEY_WEBSITE_ID , $ stockItemData );
55
52
56
53
// officially get the product
57
54
$ response = $ this ->getProduct ($ productData [ProductInterface::SKU ]);
@@ -100,7 +97,6 @@ public function testCatalogInventoryWithBogusData()
100
97
$ productData = $ this ->getSimpleProductData ($ qty );
101
98
$ stockItemData = $ this ->getStockItemData ($ qty );
102
99
$ this ->assertArrayNotHasKey (self ::KEY_ITEM_ID , $ stockItemData );
103
- $ this ->assertArrayNotHasKey (self ::KEY_WEBSITE_ID , $ stockItemData );
104
100
$ this ->assertArrayNotHasKey (self ::KEY_PRODUCT_ID , $ stockItemData );
105
101
$ productData [self ::KEY_EXTENSION_ATTRIBUTES ] = $ stockItemData ;
106
102
@@ -113,7 +109,6 @@ public function testCatalogInventoryWithBogusData()
113
109
$ this ->assertEquals ($ qty , $ returnedQty , 'POST 1: Expected qty to be same: ' . $ qty .', ' . $ returnedQty );
114
110
$ this ->assertArrayHasKey (self ::KEY_ITEM_ID , $ stockItemData );
115
111
$ this ->assertArrayHasKey (self ::KEY_PRODUCT_ID , $ stockItemData );
116
- $ this ->assertArrayHasKey (self ::KEY_WEBSITE_ID , $ stockItemData );
117
112
118
113
// re-save the catalog inventory:
119
114
// -- update quantity (which should be honored)
@@ -126,9 +121,7 @@ public function testCatalogInventoryWithBogusData()
126
121
$ bogusProductId = $ this ->getDifferent ($ originalProductId );
127
122
$ response [self ::KEY_EXTENSION_ATTRIBUTES ][self ::KEY_STOCK_ITEM ][self ::KEY_PRODUCT_ID ] = $ bogusProductId ;
128
123
129
- $ originalWebsiteId = $ stockItemData [self ::KEY_WEBSITE_ID ];
130
124
$ bogusWebsiteId = $ this ->getDifferent ($ originalWebsiteId );
131
- $ response [self ::KEY_EXTENSION_ATTRIBUTES ][self ::KEY_STOCK_ITEM ][self ::KEY_WEBSITE_ID ] = $ bogusWebsiteId ;
132
125
133
126
$ response = $ this ->saveProduct ($ response );
134
127
@@ -139,7 +132,6 @@ public function testCatalogInventoryWithBogusData()
139
132
$ returnedProductId = $ stockItemData [self ::KEY_PRODUCT_ID ];
140
133
$ this ->assertEquals ($ originalProductId , $ returnedProductId );
141
134
142
- $ returnedWebsiteId = $ stockItemData [self ::KEY_WEBSITE_ID ];
143
135
$ this ->assertEquals ($ originalWebsiteId , $ returnedWebsiteId );
144
136
145
137
// delete the product; expect that all goes well
@@ -165,7 +157,6 @@ public function testSimpleProductCreationWithoutSpecifyingCatalogInventory()
165
157
$ stockItemData = $ response [self ::KEY_EXTENSION_ATTRIBUTES ][self ::KEY_STOCK_ITEM ];
166
158
$ this ->assertArrayHasKey (self ::KEY_ITEM_ID , $ stockItemData );
167
159
$ this ->assertArrayHasKey (self ::KEY_PRODUCT_ID , $ stockItemData );
168
- $ this ->assertArrayHasKey (self ::KEY_WEBSITE_ID , $ stockItemData );
169
160
170
161
// delete the product; expect that all goes well
171
162
$ response = $ this ->deleteProduct ($ productData [ProductInterface::SKU ]);
0 commit comments