summaryrefslogtreecommitdiff
path: root/modules/translation
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-12 14:38:37 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-12 14:38:37 +0000
commit160b42812c2ec0a32fcdcd02f32d3f86e549fac7 (patch)
treedf699a16df19f072114ada0a36bb19808bf39c55 /modules/translation
parentd8e62ff260991b911a05092d285aa6a31cdb8229 (diff)
downloadbrdo-160b42812c2ec0a32fcdcd02f32d3f86e549fac7.tar.gz
brdo-160b42812c2ec0a32fcdcd02f32d3f86e549fac7.tar.bz2
- Patch #335035 by boombatower, Damien Tournoud, ksenzee, Berdir, Dave Reid, effulgentsia: Simpletest drupalPost() incorrectly submits input for disabled elements, causing unreliable testing of forms that contain them.
Diffstat (limited to 'modules/translation')
-rw-r--r--modules/translation/translation.test7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/translation/translation.test b/modules/translation/translation.test
index 78d093e84..0ef64c275 100644
--- a/modules/translation/translation.test
+++ b/modules/translation/translation.test
@@ -110,11 +110,14 @@ class TranslationTestCase extends DrupalWebTestCase {
$this->assertRaw(t('The language %language has been created and can now be used. More information is available on the <a href="@locale-help">help screen</a>.', array('%language' => $languages[$language_code]->name, '@locale-help' => url('admin/help/locale'))), t('Language has been created.'));
}
}
+ elseif ($this->xpath('//input[@type=\'checkbox\' and @name=\'enabled[' . $language_code . ']\' and @checked=\'checked\']')) {
+ // It's installed and enabled. No need to do anything.
+ $this->assertTrue(true, 'Language [' . $language_code . '] already installed and enabled.');
+ }
else {
- // Ensure that it is enabled.
+ // It's installed but not enabled. Enable it.
$this->assertTrue(true, 'Language [' . $language_code . '] already installed.');
$this->drupalPost(NULL, array('enabled[' . $language_code . ']' => TRUE), t('Save configuration'));
-
$this->assertRaw(t('Configuration saved.'), t('Language successfully enabled.'));
}
}