summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/upgrade/upgrade.test
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-02-27 17:08:32 -0500
committerDavid Rothstein <drothstein@gmail.com>2013-02-27 17:08:32 -0500
commit297665a47120ae533aa1bbde1de9cb1227e7c6bf (patch)
tree1488b6c8a5c817a12c662f4715a02c4bec2e82ad /modules/simpletest/tests/upgrade/upgrade.test
parentad244e2cb8a23b767907a5e33a2d675d251b248a (diff)
downloadbrdo-297665a47120ae533aa1bbde1de9cb1227e7c6bf.tar.gz
brdo-297665a47120ae533aa1bbde1de9cb1227e7c6bf.tar.bz2
Issue #1012620 by Berdir, kbasarab, YesCT: Fixed Unique key on date_formats().(format|type) is problematic for case insensitive collations.
Diffstat (limited to 'modules/simpletest/tests/upgrade/upgrade.test')
-rw-r--r--modules/simpletest/tests/upgrade/upgrade.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/simpletest/tests/upgrade/upgrade.test b/modules/simpletest/tests/upgrade/upgrade.test
index 9df8ec779..cc849aa79 100644
--- a/modules/simpletest/tests/upgrade/upgrade.test
+++ b/modules/simpletest/tests/upgrade/upgrade.test
@@ -566,6 +566,20 @@ class BasicMinimalUpdatePath extends UpdatePathTestCase {
// Confirm that no {menu_links} entry exists for user/autocomplete.
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(':user_autocomplete' => 'user/autocomplete'))->fetchField();
$this->assertFalse($result, t('No {menu_links} entry exists for user/autocomplete'));
+
+ // Confirm that a date format that just differs in the case can be added.
+ $admin_date_format = 'j M y';
+ $edit = array('date_format' => $admin_date_format);
+ $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, t('Add format'));
+
+ // Add a new date format which just differs in the case.
+ $admin_date_format_uppercase = 'j M Y';
+ $edit = array('date_format' => $admin_date_format_uppercase);
+ $this->drupalPost('admin/config/regional/date-time/formats/add', $edit, t('Add format'));
+ $this->assertText(t('Custom date format added.'));
+
+ // Verify that the unique key on {date_formats}.format still exists.
+ $this->assertTrue(db_index_exists('date_formats', 'formats'), 'Unique key on {date_formats} exists');
}
}