function ConfigTranslationOverviewTest::testHiddenEntities

Same name in other branches
  1. 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationOverviewTest::testHiddenEntities()
  2. 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationOverviewTest::testHiddenEntities()
  3. 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationOverviewTest::testHiddenEntities()

Tests availability of hidden entities in the translation overview.

File

core/modules/config_translation/tests/src/Functional/ConfigTranslationOverviewTest.php, line 139

Class

ConfigTranslationOverviewTest
Translate settings and entities to various languages.

Namespace

Drupal\Tests\config_translation\Functional

Code

public function testHiddenEntities() : void {
    // Hidden languages are only available to translate through the
    // configuration translation listings.
    $this->drupalGet('admin/config/regional/config-translation/configurable_language');
    $this->assertSession()
        ->pageTextContains('Not applicable');
    $this->assertSession()
        ->linkByHrefExists('admin/config/regional/language/edit/zxx/translate');
    $this->assertSession()
        ->pageTextContains('Not specified');
    $this->assertSession()
        ->linkByHrefExists('admin/config/regional/language/edit/und/translate');
    // Hidden date formats are only available to translate through the
    // configuration translation listings. Test a couple of them.
    $this->drupalGet('admin/config/regional/config-translation/date_format');
    $this->assertSession()
        ->pageTextContains('HTML Date');
    $this->assertSession()
        ->linkByHrefExists('admin/config/regional/date-time/formats/manage/html_date/translate');
    $this->assertSession()
        ->pageTextContains('HTML Year');
    $this->assertSession()
        ->linkByHrefExists('admin/config/regional/date-time/formats/manage/html_year/translate');
}

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