function ContentTranslationStandardFieldsTest::testFieldTranslatableArticle

Same name in other branches
  1. 9 core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationStandardFieldsTest::testFieldTranslatableArticle()
  2. 10 core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationStandardFieldsTest::testFieldTranslatableArticle()
  3. 11.x core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php \Drupal\Tests\content_translation\Functional\ContentTranslationStandardFieldsTest::testFieldTranslatableArticle()

Tests that translatable fields are being rendered.

File

core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php, line 55

Class

ContentTranslationStandardFieldsTest
Tests the Content translation settings using the standard profile.

Namespace

Drupal\Tests\content_translation\Functional

Code

public function testFieldTranslatableArticle() {
    $path = 'admin/config/regional/content-language';
    $this->drupalGet($path);
    // Check content block fields.
    $this->assertFieldByXPath("//input[@id='edit-settings-block-content-basic-fields-body' and @checked='checked']");
    // Check comment fields.
    $this->assertFieldByXPath("//input[@id='edit-settings-comment-comment-fields-comment-body' and @checked='checked']");
    // Check node fields.
    $this->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-comment' and @checked='checked']");
    $this->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-field-image' and @checked='checked']");
    $this->assertFieldByXPath("//input[@id='edit-settings-node-article-fields-field-tags' and @checked='checked']");
    // Check user fields.
    $this->assertFieldByXPath("//input[@id='edit-settings-user-user-fields-user-picture' and @checked='checked']");
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.