File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
app/code/Magento/Config/Model/Config/Backend/Currency
dev/tests/integration/testsuite/Magento/Config/Console/Command Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 14
14
namespace Magento \Config \Model \Config \Backend \Currency ;
15
15
16
16
/**
17
+ * Base currency class
18
+ *
17
19
* @api
18
20
* @since 100.0.2
19
21
*/
@@ -26,18 +28,19 @@ abstract class AbstractCurrency extends \Magento\Framework\App\Config\Value
26
28
*/
27
29
protected function _getAllowedCurrencies ()
28
30
{
29
- if (!$ this ->isFormData () || $ this ->getData ('groups/options/fields/allow/inherit ' )) {
30
- return explode (
31
+ $ allowValue = $ this ->getData ('groups/options/fields/allow/value ' );
32
+ $ allowedCurrencies = $ allowValue === null || $ this ->getData ('groups/options/fields/allow/inherit ' )
33
+ ? explode (
31
34
', ' ,
32
35
(string )$ this ->_config ->getValue (
33
36
\Magento \Directory \Model \Currency::XML_PATH_CURRENCY_ALLOW ,
34
37
$ this ->getScope (),
35
38
$ this ->getScopeId ()
36
39
)
37
- );
38
- }
40
+ )
41
+ : ( array ) $ allowValue ;
39
42
40
- return ( array ) $ this -> getData ( ' groups/options/fields/allow/value ' ) ;
43
+ return $ allowedCurrencies ;
41
44
}
42
45
43
46
/**
Original file line number Diff line number Diff line change 28
28
/**
29
29
* Tests the different flows of config:set command.
30
30
*
31
- * { @inheritdoc}
31
+ * @inheritdoc
32
32
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
33
33
* @magentoDbIsolation enabled
34
34
*/
@@ -292,8 +292,7 @@ public function runExtendedDataProvider()
292
292
* @param string $scope
293
293
* @param $scopeCode string|null
294
294
* @dataProvider configSetValidationErrorDataProvider
295
- *
296
- * @magentoDbIsolation enabled
295
+ * @magentoDbIsolation disabled
297
296
*/
298
297
public function testConfigSetValidationError (
299
298
$ path ,
@@ -307,6 +306,7 @@ public function testConfigSetValidationError(
307
306
308
307
/**
309
308
* Data provider for testConfigSetValidationError
309
+ *
310
310
* @return array
311
311
*/
312
312
public function configSetValidationErrorDataProvider ()
@@ -399,7 +399,6 @@ public function testConfigSetCurrency()
399
399
* Saving values with successful validation
400
400
*
401
401
* @dataProvider configSetValidDataProvider
402
- *
403
402
* @magentoDbIsolation enabled
404
403
*/
405
404
public function testConfigSetValid ()
You can’t perform that action at this time.
0 commit comments