You are here

function EntityTranslationMenuTranslationTestCase::removeTranslation in Entity Translation 7

Remove translation in given langcode from node.

2 calls to EntityTranslationMenuTranslationTestCase::removeTranslation()
EntityTranslationMenuTranslationTestCase::testMenuLocalization in entity_translation_i18n_menu/entity_translation_i18n_menu.test
Test if menu localization works.
EntityTranslationMenuTranslationTestCase::testMenuTranslation in entity_translation_i18n_menu/entity_translation_i18n_menu.test
Test if menu translation works with separate menu items.

File

entity_translation_i18n_menu/entity_translation_i18n_menu.test, line 98
Tests for Entity translation module.

Class

EntityTranslationMenuTranslationTestCase
Tests for the translation of menu items on entity forms.

Code

function removeTranslation($node, $langcode) {
  $this
    ->drupalGet('node/' . $node->nid . '/translate/delete/' . $langcode);
  $this
    ->drupalPost(NULL, array(), t('Delete'));

  // Check to make sure translation was deleted.
  $this
    ->drupalGet('node/' . $node->nid . '/edit/add/' . $node->language . '/' . $langcode);
  $this
    ->assertResponse(200, 'Translation add page found. Old translation deleted.');
}