File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
app/code/Magento/Config/Model/Config/Backend/Currency
dev/tests/integration/testsuite/Magento/Deploy/Console/Command/App Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 19
19
*/
20
20
class Cron extends \Magento \Framework \App \Config \Value
21
21
{
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 ' ;
24
23
/**
25
24
* @var \Magento\Framework\App\Config\ValueFactory
26
25
*/
@@ -93,7 +92,7 @@ public function afterSave()
93
92
try {
94
93
/** @var $configValue \Magento\Framework\App\Config\ValueInterface */
95
94
$ configValue = $ this ->_configValueFactory ->create ();
96
- $ configValue ->load (self ::CRON_STRING_PATH , self :: CONFIG_FIELD );
95
+ $ configValue ->load (self ::CRON_STRING_PATH , ' path ' );
97
96
$ configValue ->setValue ($ cronExprString )->setPath (self ::CRON_STRING_PATH )->save ();
98
97
} catch (\Exception $ e ) {
99
98
throw new LocalizedException (__ ('We can \'t save the Cron expression. ' ));
Original file line number Diff line number Diff line change @@ -394,8 +394,8 @@ public function testImportCurrencyImportSchedule()
394
394
);
395
395
$ this ->runConfigImportCommand ($ commandTester , 'System config was processed ' );
396
396
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 ' );
399
399
$ time = $ configValue ->getValue ();
400
400
$ this ->assertSame ($ time , "$ min $ hour * * * " );
401
401
}
You can’t perform that action at this time.
0 commit comments