protected function MenuLinkContentTranslationUITest::doTestTranslationEdit in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/menu_link_content/src/Tests/MenuLinkContentTranslationUITest.php \Drupal\menu_link_content\Tests\MenuLinkContentTranslationUITest::doTestTranslationEdit()
Tests edit content translation.
Overrides ContentTranslationUITestBase::doTestTranslationEdit
File
- core/
modules/ menu_link_content/ src/ Tests/ MenuLinkContentTranslationUITest.php, line 105 - Contains \Drupal\menu_link_content\Tests\MenuLinkContentTranslationUITest.
Class
- MenuLinkContentTranslationUITest
- Tests the menu link content translation UI.
Namespace
Drupal\menu_link_content\TestsCode
protected function doTestTranslationEdit() {
$entity = entity_load($this->entityTypeId, $this->entityId, TRUE);
$languages = $this->container
->get('language_manager')
->getLanguages();
foreach ($this->langcodes as $langcode) {
// We only want to test the title for non-english translations.
if ($langcode != 'en') {
$options = array(
'language' => $languages[$langcode],
);
$url = $entity
->urlInfo('edit-form', $options);
$this
->drupalGet($url);
$title = t('@title [%language translation]', array(
'@title' => $entity
->getTranslation($langcode)
->label(),
'%language' => $languages[$langcode]
->getName(),
));
$this
->assertRaw($title);
}
}
}