public function AdminPathEntityConverterLanguageTest::testConfigUsingCurrentLanguage in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php \Drupal\Tests\language\Functional\AdminPathEntityConverterLanguageTest::testConfigUsingCurrentLanguage()
Tests the translated and untranslated config entities are loaded properly.
File
- core/
modules/ language/ tests/ src/ Functional/ AdminPathEntityConverterLanguageTest.php, line 35
Class
- AdminPathEntityConverterLanguageTest
- Test administration path based conversion of entities.
Namespace
Drupal\Tests\language\FunctionalCode
public function testConfigUsingCurrentLanguage() {
\Drupal::languageManager()
->getLanguageConfigOverride('es', 'language.entity.es')
->set('label', 'Español')
->save();
$this
->drupalGet('es/admin/language_test/entity_using_current_language/es');
$this
->assertNoRaw(t('Loaded %label.', [
'%label' => 'Spanish',
]));
$this
->assertRaw(t('Loaded %label.', [
'%label' => 'Español',
]));
$this
->drupalGet('es/admin/language_test/entity_using_original_language/es');
$this
->assertRaw(t('Loaded %label.', [
'%label' => 'Spanish',
]));
$this
->assertNoRaw(t('Loaded %label.', [
'%label' => 'Español',
]));
}