summaryrefslogtreecommitdiff
path: root/modules/translation/translation.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/translation/translation.test')
-rw-r--r--modules/translation/translation.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/translation/translation.test b/modules/translation/translation.test
index 1930b591f..c899ca381 100644
--- a/modules/translation/translation.test
+++ b/modules/translation/translation.test
@@ -83,6 +83,23 @@ class TranslationTestCase extends DrupalWebTestCase {
$edit['translation[status]'] = FALSE;
$this->drupalPost('node/' . $node_translation->nid . '/edit', $edit, t('Save'));
$this->assertRaw(t('Basic page %title has been updated.', array('%title' => $node_translation_title)), t('Translated node updated.'));
+
+ $this->drupalLogin($admin_user);
+
+ // Disable Spanish and confirm that links to the Spanish translations do
+ // not appear on the English node.
+ $edit = array();
+ $edit['enabled[es]'] = FALSE;
+ $this->drupalPost('admin/config/regional/language', $edit, t('Save configuration'));
+ $this->drupalGet('node/' . $node->nid);
+ $languages = language_list();
+ $this->assertNoText($languages['es']->native);
+
+ $this->drupalLogin($translator);
+
+ // Confirm that Spanish is still an option for translators when creating nodes.
+ $this->drupalGet('node/add/page');
+ $this->assertRaw('value="' . 'es' .'"', t('Spanish is available in language selection'));
}
/**