Test if the date formats are stored properly.
function testDateFormatStorage() {
$date_format_info = array(
'name' => 'testDateFormatStorage Short Format',
'pattern' => array(
'php' => 'dmYHis',
),
);
system_date_format_save('test_short', $date_format_info);
$format = config('system.date')
->get('formats.test_short.pattern.php');
$this
->assertEqual('dmYHis', $format, 'Unlocalized date format resides in general config.');
$date_format_info['locales'] = array(
'en',
);
system_date_format_save('test_short_en', $date_format_info);
$format = config('system.date')
->get('formats.test_short_en.pattern.php');
$this
->assertEqual('dmYHis', $format, 'Localized date format resides in general config too.');
$format = config('locale.config.en.system.date')
->get('formats.test_short_en.pattern.php');
$this
->assertEqual('dmYHis', $format, 'Localized date format resides in localized config.');
}