You are here

public function ConfigTranslationOverviewTest::testHiddenEntities in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php \Drupal\config_translation\Tests\ConfigTranslationOverviewTest::testHiddenEntities()

Tests availability of hidden entities in the translation overview.

File

core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php, line 134
Contains \Drupal\config_translation\Tests\ConfigTranslationOverviewTest.

Class

ConfigTranslationOverviewTest
Translate settings and entities to various languages.

Namespace

Drupal\config_translation\Tests

Code

public function testHiddenEntities() {

  // Hidden languages are only available to translate through the
  // configuration translation listings.
  $this
    ->drupalGet('admin/config/regional/config-translation/configurable_language');
  $this
    ->assertText('Not applicable');
  $this
    ->assertLinkByHref('admin/config/regional/language/edit/zxx/translate');
  $this
    ->assertText('Not specified');
  $this
    ->assertLinkByHref('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
    ->assertText('HTML Date');
  $this
    ->assertLinkByHref('admin/config/regional/date-time/formats/manage/html_date/translate');
  $this
    ->assertText('HTML Year');
  $this
    ->assertLinkByHref('admin/config/regional/date-time/formats/manage/html_year/translate');
}