diff --git a/tests/title.test b/tests/title.test index 21d2139..fd15825 100644 --- a/tests/title.test +++ b/tests/title.test @@ -402,6 +402,23 @@ class TitleTranslationTestCase extends DrupalWebTestCase { // Check that legacy fields have the correct values. $this->assertEqual($term->name, $original_values['name'], t('Taxonomy term name correctly stored.')); $this->assertEqual($term->description, $original_values['description'], t('Taxonomy term description correctly stored.')); + + // Use the original language code as path prefix instead the translation + // language and check if the interface language doesn't affect the + // translations. + $translated_values = array( + 'name' => $this->randomName(), + 'description' => $this->randomName(), + ); + $edit = $this->editValues($translated_values, $translation_langcode); + $this->drupalPost($langcode . '/taxonomy/term/' . $term->tid . '/edit/' . $translation_langcode, $edit, t('Save')); + $term = $this->termLoad($term->tid); + $this->assertTrue($this->checkFieldValues($term, $translated_values, $translation_langcode, FALSE), t('Taxonomy term translation updated.')); + $this->assertTrue($this->checkFieldValues($term, $original_values, $langcode), t('Taxonomy term original values preserved.')); + + // Check that legacy fields have the correct values. + $this->assertEqual($term->name, $original_values['name'], t('Taxonomy term name correctly stored.')); + $this->assertEqual($term->description, $original_values['description'], t('Taxonomy term description correctly stored.')); } /**