11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2024 Adobe
4+ * All Rights Reserved .
55 */
66declare (strict_types=1 );
77
@@ -100,15 +100,13 @@ public function testSaveOptionSystemAttribute()
100100 )->method (
101101 'fetchRow '
102102 )->willReturnMap (
103-
103+ [
104104 [
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+ ]
112110 );
113111 $ connectionMock ->expects (
114112 $ this ->once ()
@@ -242,24 +240,22 @@ public function testSaveOptionNewUserDefinedAttribute()
242240 )->method (
243241 'update '
244242 )->willReturnMap (
245-
246- [[ 'eav_attribute ' , ['default_value ' => '' ], ['attribute_id = ? ' => 123 ], 1 ] ]
247-
243+ [
244+ ['eav_attribute ' , ['default_value ' => '' ], ['attribute_id = ? ' => 123 ], 1 ]
245+ ]
248246 );
249247 $ connectionMock ->expects (
250248 $ this ->once ()
251249 )->method (
252250 'fetchRow '
253251 )->willReturnMap (
254-
252+ [
255253 [
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+ ]
263259 );
264260 $ connectionMock ->expects (
265261 $ this ->once ()
@@ -273,22 +269,20 @@ public function testSaveOptionNewUserDefinedAttribute()
273269 )->method (
274270 'insert '
275271 )->willReturnMap (
276-
272+ [
273+ ['eav_attribute ' , $ attributeData , 1 ],
274+ ['eav_attribute_option ' , ['attribute_id ' => 123 , 'sort_order ' => 0 ], 1 ],
277275 [
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+ ]
292286 );
293287 $ connectionMock ->expects ($ this ->any ())->method ('getTransactionLevel ' )->willReturn (1 );
294288
0 commit comments