Skip to content

Commit 293d9b8

Browse files
committed
Resolving deprecations
1 parent f341bc2 commit 293d9b8

File tree

11 files changed

+100
-100
lines changed

11 files changed

+100
-100
lines changed

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/BooleanFilterTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@ public static function getFiltersWithCustomAttributeDataProvider(): array
4141
{
4242
return [
4343
'not_used_in_navigation' => [
44-
'products_data' => [],
45-
'attribute_data' => ['is_filterable' => 0],
44+
'products' => [],
45+
'attributeData' => ['is_filterable' => 0],
4646
'expectation' => [],
4747
],
4848
'used_in_navigation_with_results' => [
49-
'products_data' => [
49+
'products' => [
5050
'simple1000' => 'Yes',
5151
'simple1001' => 'Yes',
5252
],
53-
'attribute_data' => ['is_filterable' => AbstractFilter::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS],
53+
'attributeData' => ['is_filterable' => AbstractFilter::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS],
5454
'expectation' => [
5555
['label' => 'Yes', 'count' => 2],
5656
],
5757
],
5858
'used_in_navigation_without_results' => [
59-
'products_data' => [
59+
'products' => [
6060
'simple1000' => 'Yes',
6161
'simple1001' => 'Yes',
6262
],
63-
'attribute_data' => ['is_filterable' => 2],
63+
'attributeData' => ['is_filterable' => 2],
6464
'expectation' => [
6565
['label' => 'Yes', 'count' => 2],
6666
['label' => 'No', 'count' => 0],
@@ -95,28 +95,28 @@ public static function getActiveFiltersWithCustomAttributeDataProvider(): array
9595
{
9696
return [
9797
'selected_yes_option_in_all_products' => [
98-
'products_data' => ['simple1000' => 'Yes', 'simple1001' => 'Yes'],
98+
'products' => ['simple1000' => 'Yes', 'simple1001' => 'Yes'],
9999
'expectation' => ['label' => 'Yes', 'count' => 0],
100-
'filter_value' => 'Yes',
101-
'products_count' => 2,
100+
'filterValue' => 'Yes',
101+
'productsCount' => 2,
102102
],
103103
'selected_yes_option_in_one_product' => [
104-
'products_data' => ['simple1000' => 'Yes', 'simple1001' => 'No'],
104+
'products' => ['simple1000' => 'Yes', 'simple1001' => 'No'],
105105
'expectation' => ['label' => 'Yes', 'count' => 0],
106-
'filter_value' => 'Yes',
107-
'products_count' => 1,
106+
'filterValue' => 'Yes',
107+
'productsCount' => 1,
108108
],
109109
'selected_no_option_in_all_products' => [
110-
'products_data' => ['simple1000' => 'No', 'simple1001' => 'No'],
110+
'products' => ['simple1000' => 'No', 'simple1001' => 'No'],
111111
'expectation' => ['label' => 'No', 'count' => 0],
112-
'filter_value' => 'No',
113-
'products_count' => 2,
112+
'filterValue' => 'No',
113+
'productsCount' => 2,
114114
],
115115
'selected_no_option_in_one_product' => [
116-
'products_data' => ['simple1000' => 'Yes', 'simple1001' => 'No'],
116+
'products' => ['simple1000' => 'Yes', 'simple1001' => 'No'],
117117
'expectation' => ['label' => 'No', 'count' => 0],
118-
'filter_value' => 'No',
119-
'products_count' => 1,
118+
'filterValue' => 'No',
119+
'productsCount' => 1,
120120
],
121121
];
122122
}

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/DecimalFilterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public static function getFiltersWithCustomAttributeDataProvider(): array
7878
{
7979
return [
8080
'not_used_in_navigation' => [
81-
'products_data' => [],
82-
'attribute_data' => ['is_filterable' => 0],
81+
'products' => [],
82+
'attributeData' => ['is_filterable' => 0],
8383
'expectation' => [],
8484
],
8585

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/FilterScopeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testGetFilters(int $scope, array $products, array $expectation):
8585
/**
8686
* @return array
8787
*/
88-
public function filtersWithScopeDataProvider(): array
88+
public static function filtersWithScopeDataProvider(): array
8989
{
9090
return [
9191
'with_scope_store' => [

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/MultipleFiltersTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function getMultipleActiveFiltersDataProvider(): array
5858
{
5959
return [
6060
'without_filters' => [
61-
'products_data' => [
61+
'products' => [
6262
'test_configurable' => [
6363
'simple1000' => 'Option 1',
6464
'simple1001' => 'Option 2',
@@ -71,10 +71,10 @@ public static function getMultipleActiveFiltersDataProvider(): array
7171
],
7272
],
7373
'filters' => [],
74-
'expected_products' => ['simple1000', 'simple1001', 'simple1002'],
74+
'expectedProducts' => ['simple1000', 'simple1001', 'simple1002'],
7575
],
7676
'applied_first_option_in_both_filters' => [
77-
'products_data' => [
77+
'products' => [
7878
'test_configurable' => [
7979
'simple1000' => 'Option 1',
8080
'simple1001' => 'Option 1',
@@ -87,10 +87,10 @@ public static function getMultipleActiveFiltersDataProvider(): array
8787
],
8888
],
8989
'filters' => ['test_configurable' => 'Option 1', 'dropdown_attribute' => 'Option 1'],
90-
'expected_products' => ['simple1000', 'simple1001'],
90+
'expectedProducts' => ['simple1000', 'simple1001'],
9191
],
9292
'applied_mixed_options_in_filters' => [
93-
'products_data' => [
93+
'products' => [
9494
'test_configurable' => [
9595
'simple1000' => 'Option 1',
9696
'simple1001' => 'Option 2',
@@ -103,7 +103,7 @@ public static function getMultipleActiveFiltersDataProvider(): array
103103
],
104104
],
105105
'filters' => ['test_configurable' => 'Option 2', 'dropdown_attribute' => 'Option 3'],
106-
'expected_products' => ['simple1002'],
106+
'expectedProducts' => ['simple1002'],
107107
],
108108
];
109109
}

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/MultiselectFilterTest.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,27 @@ public static function getFiltersWithCustomAttributeDataProvider(): array
4242
{
4343
return [
4444
'not_used_in_navigation' => [
45-
'products_data' => [],
46-
'attribute_data' => ['is_filterable' => 0],
45+
'products' => [],
46+
'attributeData' => ['is_filterable' => 0],
4747
'expectation' => [],
4848
],
4949
'used_in_navigation_with_results' => [
50-
'products_data' => [
50+
'products' => [
5151
'simple1000' => 'Option 1',
5252
'simple1001' => 'Option 2',
5353
],
54-
'attribute_data' => ['is_filterable' => AbstractFilter::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS],
54+
'attributeData' => ['is_filterable' => AbstractFilter::ATTRIBUTE_OPTIONS_ONLY_WITH_RESULTS],
5555
'expectation' => [
5656
['label' => 'Option 1', 'count' => 1],
5757
['label' => 'Option 2', 'count' => 1],
5858
],
5959
],
6060
'used_in_navigation_without_results' => [
61-
'products_data' => [
61+
'products' => [
6262
'simple1000' => 'Option 1',
6363
'simple1001' => 'Option 2',
6464
],
65-
'attribute_data' => ['is_filterable' => 2],
65+
'attributeData' => ['is_filterable' => 2],
6666
'expectation' => [
6767
['label' => 'Option 1', 'count' => 1],
6868
['label' => 'Option 2', 'count' => 1],
@@ -95,32 +95,32 @@ public function testGetActiveFiltersWithCustomAttribute(
9595
/**
9696
* @return array
9797
*/
98-
public function getActiveFiltersWithCustomAttributeDataProvider(): array
98+
public static function getActiveFiltersWithCustomAttributeDataProvider(): array
9999
{
100100
return [
101101
'filter_by_first_option_in_products_with_first_option' => [
102-
'products_data' => ['simple1000' => 'Option 1', 'simple1001' => 'Option 1'],
102+
'products' => ['simple1000' => 'Option 1', 'simple1001' => 'Option 1'],
103103
'expectation' => ['label' => 'Option 1', 'count' => 0],
104-
'filter_value' => 'Option 1',
105-
'products_count' => 2,
104+
'filterValue' => 'Option 1',
105+
'productsCount' => 2,
106106
],
107107
'filter_by_first_option_in_products_with_different_options' => [
108-
'products_data' => ['simple1000' => 'Option 1', 'simple1001' => 'Option 2'],
108+
'products' => ['simple1000' => 'Option 1', 'simple1001' => 'Option 2'],
109109
'expectation' => ['label' => 'Option 1', 'count' => 0],
110-
'filter_value' => 'Option 1',
111-
'products_count' => 1,
110+
'filterValue' => 'Option 1',
111+
'productsCount' => 1,
112112
],
113113
'filter_by_second_option_in_products_with_two_options' => [
114-
'products_data' => ['simple1000' => 'Option 1,Option 2', 'simple1001' => 'Option 1,Option 2'],
114+
'products' => ['simple1000' => 'Option 1,Option 2', 'simple1001' => 'Option 1,Option 2'],
115115
'expectation' => ['label' => 'Option 2', 'count' => 0],
116-
'filter_value' => 'Option 2',
117-
'products_count' => 2,
116+
'filterValue' => 'Option 2',
117+
'productsCount' => 2,
118118
],
119119
'filter_by_second_option_in_products_with_hybrid_options' => [
120-
'products_data' => ['simple1000' => 'Option 1,Option 2', 'simple1001' => 'Option 2'],
120+
'products' => ['simple1000' => 'Option 1,Option 2', 'simple1001' => 'Option 2'],
121121
'expectation' => ['label' => 'Option 2', 'count' => 0],
122-
'filter_value' => 'Option 2',
123-
'products_count' => 2,
122+
'filterValue' => 'Option 2',
123+
'productsCount' => 2,
124124
],
125125
];
126126
}

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/OutOfStockProductsFilterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ public function testGetFiltersWithOutOfStockProduct(int $showOutOfStock, array $
6262
/**
6363
* @return array
6464
*/
65-
public function getFiltersWithOutOfStockProduct(): array
65+
public static function getFiltersWithOutOfStockProduct(): array
6666
{
6767
return [
6868
'show_out_of_stock' => [
69-
'show_out_of_stock' => 1,
69+
'showOutOfStock' => 1,
7070
'expectation' => [['label' => 'Option 1', 'count' => 1], ['label' => 'Option 2', 'count' => 1]],
7171
],
7272
'not_show_out_of_stock' => [
73-
'show_out_of_stock' => 0,
73+
'showOutOfStock' => 0,
7474
'expectation' => [['label' => 'Option 2', 'count' => 1]],
7575
],
7676
];

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/PriceFilterTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function getFiltersDataProvider(): array
6666
return [
6767
'auto_calculation_variation_with_small_price_difference' => [
6868
'config' => ['catalog/layered_navigation/price_range_calculation' => 'auto'],
69-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
69+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
7070
'expectation' => [
7171
['label' => '$10.00 - $19.99', 'value' => '10-20', 'count' => 1],
7272
['label' => '$20.00 - $29.99', 'value' => '20-30', 'count' => 1],
@@ -75,15 +75,15 @@ public static function getFiltersDataProvider(): array
7575
],
7676
'auto_calculation_variation_with_big_price_difference' => [
7777
'config' => ['catalog/layered_navigation/price_range_calculation' => 'auto'],
78-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 300.00],
78+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 300.00],
7979
'expectation' => [
8080
['label' => '$0.00 - $99.99', 'value' => '0-100', 'count' => 2],
8181
['label' => '$300.00 and above', 'value' => '300-400', 'count' => 1],
8282
],
8383
],
8484
'auto_calculation_variation_with_fixed_price_step' => [
8585
'config' => ['catalog/layered_navigation/price_range_calculation' => 'auto'],
86-
'products_data' => ['simple1000' => 300.00, 'simple1001' => 400.00, 'simple1002' => 500.00],
86+
'products' => ['simple1000' => 300.00, 'simple1001' => 400.00, 'simple1002' => 500.00],
8787
'expectation' => [
8888
['label' => '$300.00 - $399.99', 'value' => '300-400', 'count' => 1],
8989
['label' => '$400.00 - $499.99', 'value' => '400-500', 'count' => 1],
@@ -95,7 +95,7 @@ public static function getFiltersDataProvider(): array
9595
'catalog/layered_navigation/price_range_calculation' => 'improved',
9696
'catalog/layered_navigation/interval_division_limit' => 3,
9797
],
98-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
98+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
9999
'expectation' => [
100100
['label' => '$0.00 - $19.99', 'value' => '0-20', 'count' => 1],
101101
['label' => '$20.00 and above', 'value' => '20-50.01', 'count' => 2],
@@ -106,7 +106,7 @@ public static function getFiltersDataProvider(): array
106106
'catalog/layered_navigation/price_range_calculation' => 'improved',
107107
'catalog/layered_navigation/interval_division_limit' => 3,
108108
],
109-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 300.00],
109+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 300.00],
110110
'expectation' => [
111111
['label' => '$0.00 - $19.99', 'value' => '0-20', 'count' => 1],
112112
['label' => '$20.00 and above', 'value' => '20-300.01', 'count' => 2],
@@ -117,7 +117,7 @@ public static function getFiltersDataProvider(): array
117117
'catalog/layered_navigation/price_range_calculation' => 'manual',
118118
'catalog/layered_navigation/price_range_step' => 200,
119119
],
120-
'products_data' => ['simple1000' => 300.00, 'simple1001' => 300.00, 'simple1002' => 500.00],
120+
'products' => ['simple1000' => 300.00, 'simple1001' => 300.00, 'simple1002' => 500.00],
121121
'expectation' => [
122122
['label' => '$200.00 - $399.99', 'value' => '200-400', 'count' => 2],
123123
['label' => '$400.00 and above', 'value' => '400-600', 'count' => 1],
@@ -128,7 +128,7 @@ public static function getFiltersDataProvider(): array
128128
'catalog/layered_navigation/price_range_calculation' => 'manual',
129129
'catalog/layered_navigation/price_range_step' => 10,
130130
],
131-
'products_data' => ['simple1000' => 300.00, 'simple1001' => 300.00, 'simple1002' => 500.00],
131+
'products' => ['simple1000' => 300.00, 'simple1001' => 300.00, 'simple1002' => 500.00],
132132
'expectation' => [
133133
['label' => '$300.00 - $309.99', 'value' => '300-310', 'count' => 2],
134134
['label' => '$500.00 and above', 'value' => '500-510', 'count' => 1],
@@ -140,7 +140,7 @@ public static function getFiltersDataProvider(): array
140140
'catalog/layered_navigation/price_range_step' => 10,
141141
'catalog/layered_navigation/price_range_max_intervals' => 10,
142142
],
143-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 30.00],
143+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 30.00],
144144
'expectation' => [
145145
['label' => '$10.00 - $19.99', 'value' => '10-20', 'count' => 1],
146146
['label' => '$20.00 - $29.99', 'value' => '20-30', 'count' => 1],
@@ -153,7 +153,7 @@ public static function getFiltersDataProvider(): array
153153
'catalog/layered_navigation/price_range_step' => 10,
154154
'catalog/layered_navigation/price_range_max_intervals' => 2,
155155
],
156-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 30.00],
156+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 30.00],
157157
'expectation' => [
158158
['label' => '$10.00 - $19.99', 'value' => '10-20', 'count' => 1],
159159
['label' => '$20.00 and above', 'value' => '20-30.01', 'count' => 2],
@@ -181,33 +181,33 @@ public function testGetActiveFilters(array $config, array $products, array $expe
181181
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
182182
* @return array
183183
*/
184-
public function getActiveFiltersDataProvider(): array
184+
public static function getActiveFiltersDataProvider(): array
185185
{
186186
return [
187187
'auto_calculation' => [
188188
'config' => ['catalog/layered_navigation/price_range_calculation' => 'auto'],
189-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
189+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
190190
'expectation' => ['label' => '$10.00 - $19.99', 'count' => 0],
191-
'filter_value' => '10-20',
191+
'filterValue' => '10-20',
192192
],
193193
'improved_calculation' => [
194194
'config' => [
195195
'catalog/layered_navigation/price_range_calculation' => 'improved',
196196
'catalog/layered_navigation/interval_division_limit' => 3,
197197
],
198-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
198+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 50.00],
199199
'expectation' => ['label' => '$0.00 - $19.99', 'count' => 0],
200-
'filter_value' => '0-20',
200+
'filterValue' => '0-20',
201201
],
202202
'manual_calculation' => [
203203
'config' => [
204204
'catalog/layered_navigation/price_range_calculation' => 'manual',
205205
'catalog/layered_navigation/price_range_step' => 10,
206206
'catalog/layered_navigation/price_range_max_intervals' => 10,
207207
],
208-
'products_data' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 30.00],
208+
'products' => ['simple1000' => 10.00, 'simple1001' => 20.00, 'simple1002' => 30.00],
209209
'expectation' => ['label' => '$10.00 - $19.99', 'count' => 0],
210-
'filter_value' => '10-20',
210+
'filterValue' => '10-20',
211211
],
212212
];
213213
}

0 commit comments

Comments
 (0)