protected function ContentTranslationUITestBase::doTestTranslationEdit in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php \Drupal\content_translation\Tests\ContentTranslationUITestBase::doTestTranslationEdit()
Tests edit content translation.
1 call to ContentTranslationUITestBase::doTestTranslationEdit()
- ContentTranslationUITestBase::testTranslationUI in core/
modules/ content_translation/ src/ Tests/ ContentTranslationUITestBase.php - Tests the basic translation UI.
7 methods override ContentTranslationUITestBase::doTestTranslationEdit()
- BlockContentTranslationUITest::doTestTranslationEdit in core/
modules/ block_content/ src/ Tests/ BlockContentTranslationUITest.php - Tests edit content translation.
- CommentTranslationUITest::doTestTranslationEdit in core/
modules/ comment/ src/ Tests/ CommentTranslationUITest.php - Tests edit content translation.
- MenuLinkContentTranslationUITest::doTestTranslationEdit in core/
modules/ menu_link_content/ src/ Tests/ MenuLinkContentTranslationUITest.php - Tests edit content translation.
- NodeTranslationUITest::doTestTranslationEdit in core/
modules/ node/ src/ Tests/ NodeTranslationUITest.php - Tests edit content translation.
- ShortcutTranslationUITest::doTestTranslationEdit in core/
modules/ shortcut/ src/ Tests/ ShortcutTranslationUITest.php - Tests edit content translation.
File
- core/
modules/ content_translation/ src/ Tests/ ContentTranslationUITestBase.php, line 472 - Contains \Drupal\content_translation\Tests\ContentTranslationUITestBase.
Class
- ContentTranslationUITestBase
- Tests the Content Translation UI.
Namespace
Drupal\content_translation\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);
$this
->assertRaw($entity
->getTranslation($langcode)
->label());
}
}
}