File tree Expand file tree Collapse file tree 2 files changed +5
-25
lines changed
Test/Unit/Ui/DataProvider/Product/Form/Modifier
Ui/DataProvider/Product/Form/Modifier Expand file tree Collapse file tree 2 files changed +5
-25
lines changed Original file line number Diff line number Diff line change @@ -441,15 +441,6 @@ public function testModifyData()
441
441
$ this ->searchResultsMock ->expects ($ this ->once ())->method ('getItems ' )
442
442
->willReturn ([$ this ->eavAttributeMock ]);
443
443
444
- $ this ->storeMock ->expects (($ this ->once ()))->method ('getBaseCurrencyCode ' )
445
- ->willReturn ('en_US ' );
446
- $ this ->storeManagerMock ->expects ($ this ->once ())->method ('getStore ' )
447
- ->willReturn ($ this ->storeMock );
448
- $ this ->currencyMock ->expects ($ this ->once ())->method ('toCurrency ' )
449
- ->willReturn ('19.99 ' );
450
- $ this ->currencyLocaleMock ->expects ($ this ->once ())->method ('getCurrency ' )
451
- ->willReturn ($ this ->currencyMock );
452
-
453
444
$ this ->assertEquals ($ sourceData , $ this ->eav ->modifyData ([]));
454
445
}
455
446
Original file line number Diff line number Diff line change @@ -1100,21 +1100,6 @@ private function calculateGroupCode(AttributeGroupInterface $group)
1100
1100
return $ attributeGroupCode ;
1101
1101
}
1102
1102
1103
- /**
1104
- * The getter function to get the locale currency for real application code
1105
- *
1106
- * @return \Magento\Framework\Locale\CurrencyInterface
1107
- *
1108
- * @deprecated 101.0.0
1109
- */
1110
- private function getLocaleCurrency ()
1111
- {
1112
- if ($ this ->localeCurrency === null ) {
1113
- $ this ->localeCurrency = \Magento \Framework \App \ObjectManager::getInstance ()->get (CurrencyInterface::class);
1114
- }
1115
- return $ this ->localeCurrency ;
1116
- }
1117
-
1118
1103
/**
1119
1104
* Format price according to the locale of the currency
1120
1105
*
@@ -1127,7 +1112,11 @@ protected function formatPrice($value)
1127
1112
return null ;
1128
1113
}
1129
1114
1130
- $ value = \Zend_Locale_Math::normalize (\Zend_Locale_Math::round ($ value , self ::PRECISION ));
1115
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
1116
+ $ roundValue = call_user_func ([\Zend_Locale_Math::class, 'round ' ], $ value , self ::PRECISION );
1117
+
1118
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
1119
+ $ value = call_user_func ([\Zend_Locale_Math::class, 'normalize ' ], $ roundValue );
1131
1120
1132
1121
return $ value ;
1133
1122
}
You can’t perform that action at this time.
0 commit comments