1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2024 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
declare (strict_types=1 );
7
7
@@ -100,15 +100,13 @@ public function testSaveOptionSystemAttribute()
100
100
)->method (
101
101
'fetchRow '
102
102
)->willReturnMap (
103
-
103
+ [
104
104
[
105
- [
106
- 'SELECT `eav_attribute`.* FROM `eav_attribute` ' .
107
- 'WHERE (attribute_code="status") AND (entity_type_id="4") ' ,
108
- $ attributeData ,
109
- ],
110
- ]
111
-
105
+ 'SELECT `eav_attribute`.* FROM `eav_attribute` ' .
106
+ 'WHERE (attribute_code="status") AND (entity_type_id="4") ' ,
107
+ $ attributeData ,
108
+ ],
109
+ ]
112
110
);
113
111
$ connectionMock ->expects (
114
112
$ this ->once ()
@@ -242,24 +240,22 @@ public function testSaveOptionNewUserDefinedAttribute()
242
240
)->method (
243
241
'update '
244
242
)->willReturnMap (
245
-
246
- [[ 'eav_attribute ' , ['default_value ' => '' ], ['attribute_id = ? ' => 123 ], 1 ] ]
247
-
243
+ [
244
+ ['eav_attribute ' , ['default_value ' => '' ], ['attribute_id = ? ' => 123 ], 1 ]
245
+ ]
248
246
);
249
247
$ connectionMock ->expects (
250
248
$ this ->once ()
251
249
)->method (
252
250
'fetchRow '
253
251
)->willReturnMap (
254
-
252
+ [
255
253
[
256
- [
257
- 'SELECT `eav_attribute`.* FROM `eav_attribute` ' .
258
- 'WHERE (attribute_code="a_dropdown") AND (entity_type_id="4") ' ,
259
- false ,
260
- ],
261
- ]
262
-
254
+ 'SELECT `eav_attribute`.* FROM `eav_attribute` ' .
255
+ 'WHERE (attribute_code="a_dropdown") AND (entity_type_id="4") ' ,
256
+ false ,
257
+ ],
258
+ ]
263
259
);
264
260
$ connectionMock ->expects (
265
261
$ this ->once ()
@@ -273,22 +269,20 @@ public function testSaveOptionNewUserDefinedAttribute()
273
269
)->method (
274
270
'insert '
275
271
)->willReturnMap (
276
-
272
+ [
273
+ ['eav_attribute ' , $ attributeData , 1 ],
274
+ ['eav_attribute_option ' , ['attribute_id ' => 123 , 'sort_order ' => 0 ], 1 ],
277
275
[
278
- ['eav_attribute ' , $ attributeData , 1 ],
279
- ['eav_attribute_option ' , ['attribute_id ' => 123 , 'sort_order ' => 0 ], 1 ],
280
- [
281
- 'eav_attribute_option_value ' ,
282
- ['option_id ' => 123 , 'store_id ' => 0 , 'value ' => 'Backend Label ' ],
283
- 1
284
- ],
285
- [
286
- 'eav_attribute_option_value ' ,
287
- ['option_id ' => 123 , 'store_id ' => 1 , 'value ' => 'Frontend Label ' ],
288
- 1
289
- ],
290
- ]
291
-
276
+ 'eav_attribute_option_value ' ,
277
+ ['option_id ' => 123 , 'store_id ' => 0 , 'value ' => 'Backend Label ' ],
278
+ 1
279
+ ],
280
+ [
281
+ 'eav_attribute_option_value ' ,
282
+ ['option_id ' => 123 , 'store_id ' => 1 , 'value ' => 'Frontend Label ' ],
283
+ 1
284
+ ],
285
+ ]
292
286
);
293
287
$ connectionMock ->expects ($ this ->any ())->method ('getTransactionLevel ' )->willReturn (1 );
294
288
0 commit comments