diff options
Diffstat (limited to 'modules/translation/translation.test')
-rw-r--r-- | modules/translation/translation.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/translation/translation.test b/modules/translation/translation.test index fa8c6b63f..54b53d9fd 100644 --- a/modules/translation/translation.test +++ b/modules/translation/translation.test @@ -20,7 +20,7 @@ class TranslationTestCase extends DrupalWebTestCase { parent::setUp('locale', 'translation', 'translation_test'); // Setup users. - $this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages')); + $this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'administer languages', 'administer content types', 'administer blocks', 'access administration pages', 'translate content')); $this->translator = $this->drupalCreateUser(array('create page content', 'edit own page content', 'translate content')); $this->drupalLogin($this->admin_user); @@ -67,6 +67,14 @@ class TranslationTestCase extends DrupalWebTestCase { $node_body = $this->randomName(); $node = $this->createPage($node_title, $node_body, 'en'); + // Unpublish the original node to check that this has no impact on the + // translation overview page, publish it again afterwards. + $this->drupalLogin($this->admin_user); + $this->drupalPost('node/' . $node->nid . '/edit', array('status' => FALSE), t('Save')); + $this->drupalGet('node/' . $node->nid . '/translate'); + $this->drupalPost('node/' . $node->nid . '/edit', array('status' => NODE_PUBLISHED), t('Save')); + $this->drupalLogin($this->translator); + // Check that the "add translation" link uses a localized path. $languages = language_list(); $this->drupalGet('node/' . $node->nid . '/translate'); |