diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-22 00:58:55 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-22 00:58:55 +0000 |
commit | 34a8a369aa0afb353d95578768903c6a1d5cd06b (patch) | |
tree | cd695ff9c71a5c221f9a5ea4603b04fbc5c2b3bd /modules/translation/translation.test | |
parent | bc23bfaa11d6a8d40bb12812cfa081b9c5d9b672 (diff) | |
download | brdo-34a8a369aa0afb353d95578768903c6a1d5cd06b.tar.gz brdo-34a8a369aa0afb353d95578768903c6a1d5cd06b.tar.bz2 |
#367595 by plach, catch, sun, yched, et al: Added support for translatable fields to Field API.
Diffstat (limited to 'modules/translation/translation.test')
-rw-r--r-- | modules/translation/translation.test | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/translation/translation.test b/modules/translation/translation.test index 132ba9dd3..95f85dc9c 100644 --- a/modules/translation/translation.test +++ b/modules/translation/translation.test @@ -60,14 +60,15 @@ class TranslationTestCase extends DrupalWebTestCase { // to return to the page then resubmitting the form without a refresh. $edit = array(); $edit['title'] = $this->randomName(); - $edit['body[0][value]'] = $this->randomName(); + $langcode = FIELD_LANGUAGE_NONE; + $edit["body[$langcode][0][value]"] = $this->randomName(); $this->drupalPost('node/add/page', $edit, t('Save'), array('query' => array('translation' => $node->nid, 'language' => 'es'))); $duplicate = $this->drupalGetNodeByTitle($edit['title']); $this->assertEqual($duplicate->tnid, 0, t('The node does not have a tnid.')); // Update original and mark translation as outdated. $edit = array(); - $edit['body[0][value]'] = $this->randomName(); + $edit["body[$langcode][0][value]"] = $this->randomName(); $edit['translation[retranslate]'] = TRUE; $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); $this->assertRaw(t('Page %title has been updated.', array('%title' => $node_title)), t('Original node updated.')); @@ -78,7 +79,7 @@ class TranslationTestCase extends DrupalWebTestCase { // Update translation and mark as updated. $edit = array(); - $edit['body[0][value]'] = $this->randomName(); + $edit["body[$langcode][0][value]"] = $this->randomName(); $edit['translation[status]'] = FALSE; $this->drupalPost('node/' . $node_translation->nid . '/edit', $edit, t('Save')); $this->assertRaw(t('Page %title has been updated.', array('%title' => $node_translation_title)), t('Translated node updated.')); @@ -128,7 +129,8 @@ class TranslationTestCase extends DrupalWebTestCase { function createPage($title, $body, $language) { $edit = array(); $edit['title'] = $title; - $edit['body[0][value]'] = $body; + $langcode = FIELD_LANGUAGE_NONE; + $edit["body[$langcode][0][value]"] = $body; $edit['language'] = $language; $this->drupalPost('node/add/page', $edit, t('Save')); $this->assertRaw(t('Page %title has been created.', array('%title' => $edit['title'])), t('Page created.')); @@ -153,7 +155,8 @@ class TranslationTestCase extends DrupalWebTestCase { $edit = array(); $edit['title'] = $title; - $edit['body[0][value]'] = $body; + $langcode = FIELD_LANGUAGE_NONE; + $edit["body[$langcode][0][value]"] = $body; $this->drupalPost(NULL, $edit, t('Save')); $this->assertRaw(t('Page %title has been created.', array('%title' => $edit['title'])), t('Translation created.')); |