Skip to content

Commit 1cdd315

Browse files
ShradddhaShradddha
authored andcommitted
AC-11979:: Remove Deprecations- PhpUnit10 Integration Tests
1 parent c01fa68 commit 1cdd315

File tree

22 files changed

+272
-292
lines changed

22 files changed

+272
-292
lines changed

dev/tests/integration/framework/Magento/TestFramework/Eav/Model/Attribute/DataProvider/AbstractBaseAttributeData.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -230,44 +230,44 @@ public static function getUpdateProvider(): array
230230
$frontendInput = static::getFrontendInput();
231231
return [
232232
"{$frontendInput}_update_all_fields" => [
233-
'post_data' => static::getUpdatePostData(),
234-
'expected_data' => static::getUpdateExpectedData(),
233+
'postData' => static::getUpdatePostData(),
234+
'expectedData' => static::getUpdateExpectedData(),
235235
],
236236
"{$frontendInput}_other_is_user_defined" => [
237-
'post_data' => [
237+
'postData' => [
238238
'is_user_defined' => '2',
239239
],
240-
'expected_data' => [
240+
'expectedData' => [
241241
'is_user_defined' => '1',
242242
],
243243
],
244244
"{$frontendInput}_with_is_global_null" => [
245-
'post_data' => [
245+
'postData' => [
246246
'is_global' => null,
247247
],
248-
'expected_data' => [
248+
'expectedData' => [
249249
'is_global' => ScopedAttributeInterface::SCOPE_GLOBAL,
250250
],
251251
],
252252
"{$frontendInput}_is_visible_in_advanced_search" => [
253-
'post_data' => [
253+
'postData' => [
254254
'is_searchable' => '0',
255255
'is_visible_in_advanced_search' => '1',
256256
],
257-
'expected_data' => [
257+
'expectedData' => [
258258
'is_searchable' => '0',
259259
'is_visible_in_advanced_search' => '0',
260260
],
261261
],
262262
"{$frontendInput}_update_with_attribute_set" => [
263-
'post_data' => [
263+
'postData' => [
264264
'set' => '4',
265265
'new_attribute_set_name' => 'Text Attribute Set',
266266
'group' => 'text_attribute_group',
267267
'groupName' => 'Text Attribute Group',
268268
'groupSortOrder' => '1',
269269
],
270-
'expected_data' => [],
270+
'expectedData' => [],
271271
],
272272
];
273273
}
@@ -283,30 +283,30 @@ public static function getUpdateProviderWithErrorMessage(): array
283283
$frontendInput = static::getFrontendInput();
284284
return [
285285
"{$frontendInput}_same_attribute_set_name" => [
286-
'post_data' => [
286+
'postData' => [
287287
'set' => '4',
288288
'new_attribute_set_name' => 'Default',
289289
],
290-
'error_message' => (string)__('An attribute set named \'Default\' already exists.'),
290+
'errorMessage' => (string)__('An attribute set named \'Default\' already exists.'),
291291
],
292292
"{$frontendInput}_empty_set_id" => [
293-
'post_data' => [
293+
'postData' => [
294294
'set' => '',
295295
'new_attribute_set_name' => 'Text Attribute Set',
296296
],
297-
'error_message' => (string)__('Something went wrong while saving the attribute.'),
297+
'errorMessage' => (string)__('Something went wrong while saving the attribute.'),
298298
],
299299
"{$frontendInput}_nonexistent_attribute_id" => [
300-
'post_data' => [
300+
'postData' => [
301301
'attribute_id' => 9999,
302302
],
303-
'error_message' => (string)__('This attribute no longer exists.'),
303+
'errorMessage' => (string)__('This attribute no longer exists.'),
304304
],
305305
"{$frontendInput}_attribute_other_entity_type" => [
306-
'post_data' => [
306+
'postData' => [
307307
'attribute_id' => 45,
308308
],
309-
'error_message' => (string)__('We can\'t update the attribute.'),
309+
'errorMessage' => (string)__('We can\'t update the attribute.'),
310310
],
311311
];
312312
}
@@ -322,15 +322,15 @@ public static function getUpdateFrontendLabelsProvider(): array
322322
$frontendInput = static::getFrontendInput();
323323
return [
324324
"{$frontendInput}_update_frontend_label" => [
325-
'post_data' => [
325+
'postData' => [
326326
'frontend_label' => [
327327
Store::DEFAULT_STORE_ID => 'Test Attribute Update',
328328
'default' => 'Default Store Update',
329329
'fixture_second_store' => 'Second Store Update',
330330
'fixture_third_store' => 'Third Store Update',
331331
]
332332
],
333-
'expected_data' => [
333+
'expectedData' => [
334334
'frontend_label' => 'Test Attribute Update',
335335
'store_labels' => [
336336
'default' => 'Default Store Update',
@@ -340,26 +340,26 @@ public static function getUpdateFrontendLabelsProvider(): array
340340
],
341341
],
342342
"{$frontendInput}_remove_frontend_label" => [
343-
'post_data' => [
343+
'postData' => [
344344
'frontend_label' => [
345345
Store::DEFAULT_STORE_ID => 'Test Attribute Update',
346346
'default' => 'Default Store Update',
347347
'fixture_second_store' => '',
348348
'fixture_third_store' => '',
349349
]
350350
],
351-
'expected_data' => [
351+
'expectedData' => [
352352
'frontend_label' => 'Test Attribute Update',
353353
'store_labels' => [
354354
'default' => 'Default Store Update',
355355
],
356356
],
357357
],
358358
"{$frontendInput}_with_frontend_label_string" => [
359-
'post_data' => [
359+
'postData' => [
360360
'frontend_label' => 'Test Attribute Update',
361361
],
362-
'expected_data' => [
362+
'expectedData' => [
363363
'frontend_label' => 'Test Attribute Update',
364364
'store_labels' => [
365365
'default' => 'Default Store View',

dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/Tab/ProductTest.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,27 @@ public static function optionsFilterProvider(): array
106106
{
107107
return [
108108
'filter_yes' => [
109-
'filter_column' => 'in_category=1',
110-
'id_category' => 333,
111-
'store_id' => 1,
109+
'filterColumn' => 'in_category=1',
110+
'categoryId' => 333,
111+
'storeId' => 1,
112112
'items' => [
113113
'simple333',
114114
'simple2',
115115
],
116116
],
117117
'filter_no' => [
118-
'filter_column' => 'in_category=0',
119-
'id_category' => 333,
120-
'store_id' => 1,
118+
'filterColumn' => 'in_category=0',
119+
'categoryId' => 333,
120+
'storeId' => 1,
121121
'items' => [
122122
'product_disabled',
123123
'simple',
124124
],
125125
],
126126
'filter_any' => [
127-
'filter_column' => "",
128-
'id_category' => 333,
129-
'store_id' => 1,
127+
'filterColumn' => "",
128+
'categoryId' => 333,
129+
'storeId' => 1,
130130
'items' => [
131131
'product_disabled',
132132
'simple333',
@@ -135,9 +135,9 @@ public static function optionsFilterProvider(): array
135135
],
136136
],
137137
'flag_status' => [
138-
'filter_column' => 'status=1',
139-
'id_category' => 333,
140-
'store_id' => 1,
138+
'filterColumn' => 'status=1',
139+
'categoryId' => 333,
140+
'storeId' => 1,
141141
'items' => [
142142
'simple333',
143143
'simple2',
@@ -205,37 +205,37 @@ public static function sortingOptionsProvider(): array
205205
{
206206
return [
207207
'default_store_sort_name_asc' => [
208-
'sort_field' => 'name',
209-
'sort_direction' => 'asc',
208+
'sortField' => 'name',
209+
'sortDirection' => 'asc',
210210
'store' => 'default',
211-
'sortItems' => [
211+
'items' => [
212212
'ProductA',
213213
'ProductB',
214214
],
215215
],
216216
'default_store_sort_name_desc' => [
217-
'sort_field' => 'name',
218-
'sort_direction' => 'desc',
217+
'sortField' => 'name',
218+
'sortDirection' => 'desc',
219219
'store' => 'default',
220220
'items' => [
221221
'ProductB',
222222
'ProductA',
223223
],
224224
],
225225
'second_store_sort_name_asc' => [
226-
'sort_field' => 'name',
227-
'sort_direction' => 'asc',
226+
'sortField' => 'name',
227+
'sortDirection' => 'asc',
228228
'store' => 'store2',
229-
'sortItems' => [
229+
'items' => [
230230
'SimpleProductA',
231231
'SimpleProductB',
232232
],
233233
],
234234
'second_store_sort_name_desc' => [
235-
'sort_field' => 'name',
236-
'sort_direction' => 'desc',
235+
'sortField' => 'name',
236+
'sortDirection' => 'desc',
237237
'store' => 'store2',
238-
'sortItems' => [
238+
'items' => [
239239
'SimpleProductB',
240240
'SimpleProductA',
241241
],

dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/QtyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static function getQtyValueProvider(): array
115115
{
116116
return [
117117
'with_qty' => [
118-
'is_qty' => true,
118+
'isQty' => true,
119119
'qty' => 5,
120120
],
121121
'without_qty' => [],

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Save/UpdateCategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function categoryDataProvider(): array
6666
{
6767
return [
6868
[
69-
'post_data' => [
69+
'postData' => [
7070
'entity_id' => 333,
7171
CategoryInterface::KEY_IS_ACTIVE => '0',
7272
CategoryInterface::KEY_INCLUDE_IN_MENU => '0',

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Save/ImagesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static function simpleProductImagesDataProvider(): array
8080
{
8181
return [
8282
'simple_product_with_jpg_image' => [
83-
'post_data' => [
83+
'postData' => [
8484
'product' => [
8585
'media_gallery' => [
8686
'images' => [

dev/tests/integration/testsuite/Magento/CatalogInventory/Ui/DataProvider/Product/AddQuantityFilterToCollectionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function quantityFilterProvider(): array
7272
'from' => 100,
7373
],
7474
],
75-
'expected_products' => [
75+
'expectedProducts' => [
7676
'simple1',
7777
'simple3',
7878
],
@@ -83,7 +83,7 @@ public static function quantityFilterProvider(): array
8383
'to' => 100,
8484
],
8585
],
86-
'expected_products' => [
86+
'expectedProducts' => [
8787
'simple1',
8888
'simple2',
8989
],
@@ -95,7 +95,7 @@ public static function quantityFilterProvider(): array
9595
'to' => 130,
9696
],
9797
],
98-
'expected_products' => [
98+
'expectedProducts' => [
9999
'simple1',
100100
],
101101
],

dev/tests/integration/testsuite/Magento/Checkout/Controller/Cart/UpdateItemQtyTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,22 @@ public static function requestDataProvider(): array
116116
{
117117
return [
118118
[
119-
'request' => [],
120-
'response' => [
119+
'requestQuantity' => [],
120+
'expectedResponse' => [
121121
'success' => false,
122122
'error_message' => 'Something went wrong while saving the page.'.
123123
' Please refresh the page and try again.'
124124
]
125125
],
126126
[
127-
'request' => ['qty' => 2],
128-
'response' => [
127+
'requestQuantity' => ['qty' => 2],
128+
'expectedResponse' => [
129129
'success' => true,
130130
]
131131
],
132132
[
133-
'request' => ['qty' => 230],
134-
'response' => [
133+
'requestQuantity' => ['qty' => 230],
134+
'expectedResponse' => [
135135
'success' => false,
136136
'error_message' => '[{"error":"The requested qty is not available","itemId":3}]']
137137
],

dev/tests/integration/testsuite/Magento/Checkout/Controller/CartTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ public function testAddToCartSimpleProduct($area, $expectedPrice)
371371
public static function addAddProductDataProvider()
372372
{
373373
return [
374-
'frontend' => ['frontend', 'expected_price' => 10],
375-
'adminhtml' => ['adminhtml', 'expected_price' => 1]
374+
'frontend' => ['frontend', 'expectedPrice' => 10],
375+
'adminhtml' => ['adminhtml', 'expectedPrice' => 1]
376376
];
377377
}
378378

@@ -426,20 +426,20 @@ public static function reorderItemsDataProvider()
426426
{
427427
return [
428428
[
429-
'logged_in' => false,
430-
'request_type' => Request::METHOD_POST,
429+
'loggedIn' => false,
430+
'request' => Request::METHOD_POST,
431431
],
432432
[
433-
'logged_in' => false,
434-
'request_type' => Request::METHOD_GET,
433+
'loggedIn' => false,
434+
'request' => Request::METHOD_GET,
435435
],
436436
[
437-
'logged_in' => true,
438-
'request_type' => Request::METHOD_POST,
437+
'loggedIn' => true,
438+
'request' => Request::METHOD_POST,
439439
],
440440
[
441-
'logged_in' => true,
442-
'request_type' => Request::METHOD_GET,
441+
'loggedIn' => true,
442+
'request' => Request::METHOD_GET,
443443
],
444444
];
445445
}

0 commit comments

Comments
 (0)