function ConfigTranslationDateFormatUiTest::testDateFormatUI
Same name in other branches
- 9 core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationDateFormatUiTest::testDateFormatUI()
- 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationDateFormatUiTest::testDateFormatUI()
- 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationDateFormatUiTest::testDateFormatUI()
Tests date format translation behavior.
File
-
core/
modules/ config_translation/ tests/ src/ Functional/ ConfigTranslationDateFormatUiTest.php, line 53
Class
- ConfigTranslationDateFormatUiTest
- Tests the content translation behaviors on date formats.
Namespace
Drupal\Tests\config_translation\FunctionalCode
public function testDateFormatUI() : void {
$this->drupalGet('admin/config/regional/date-time');
// Assert translation link unlocked date format.
$this->assertSession()
->linkByHrefExists('admin/config/regional/date-time/formats/manage/medium/translate');
// Assert translation link locked date format.
$this->assertSession()
->linkByHrefExists('admin/config/regional/date-time/formats/manage/html_datetime/translate');
// Date pattern is visible on unlocked date formats.
$this->drupalGet('admin/config/regional/date-time/formats/manage/medium/translate/de/add');
$this->assertSession()
->fieldExists('translation[config_names][core.date_format.medium][pattern]');
// Date pattern is not visible on locked date formats.
$this->drupalGet('admin/config/regional/date-time/formats/manage/html_datetime/translate/es/add');
$this->assertSession()
->fieldNotExists('translation[config_names][core.date_format.html_datetime][pattern]');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.