Skip to content

Commit 9469954

Browse files
committed
AC-6588: Fix for statis test failure - 01
1 parent 33de4e7 commit 9469954

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

app/code/Magento/Config/Model/Config/Backend/Currency/Cron.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
*/
2020
class Cron extends \Magento\Framework\App\Config\Value
2121
{
22-
const CRON_STRING_PATH = 'crontab/default/jobs/currency_rates_update/schedule/cron_expr';
23-
const CONFIG_FIELD = 'path';
22+
public const CRON_STRING_PATH = 'crontab/default/jobs/currency_rates_update/schedule/cron_expr';
2423
/**
2524
* @var \Magento\Framework\App\Config\ValueFactory
2625
*/
@@ -93,7 +92,7 @@ public function afterSave()
9392
try {
9493
/** @var $configValue \Magento\Framework\App\Config\ValueInterface */
9594
$configValue = $this->_configValueFactory->create();
96-
$configValue->load(self::CRON_STRING_PATH, self::CONFIG_FIELD);
95+
$configValue->load(self::CRON_STRING_PATH, 'path');
9796
$configValue->setValue($cronExprString)->setPath(self::CRON_STRING_PATH)->save();
9897
} catch (\Exception $e) {
9998
throw new LocalizedException(__('We can\'t save the Cron expression.'));

dev/tests/integration/testsuite/Magento/Deploy/Console/Command/App/ConfigImportCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ public function testImportCurrencyImportSchedule()
394394
);
395395
$this->runConfigImportCommand($commandTester, 'System config was processed');
396396

397-
$configValue->load(Cron::CRON_STRING_PATH, Cron::CONFIG_FIELD);
398-
$configValue->getFieldsetDataValue(Cron::CONFIG_FIELD);
397+
$configValue->load(Cron::CRON_STRING_PATH, 'path');
398+
$configValue->getFieldsetDataValue('path');
399399
$time = $configValue->getValue();
400400
$this->assertSame($time, "$min $hour * * *");
401401
}

0 commit comments

Comments
 (0)