public function AdminPathEntityConverterLanguageTest::testConfigUsingCurrentLanguage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/Tests/AdminPathEntityConverterLanguageTest.php \Drupal\language\Tests\AdminPathEntityConverterLanguageTest::testConfigUsingCurrentLanguage()
Tests the translated and untranslated config entities are loaded properly.
File
- core/
modules/ language/ src/ Tests/ AdminPathEntityConverterLanguageTest.php, line 35 - Contains \Drupal\language\Tests\AdminPathEntityConverterLanguageTest.
Class
- AdminPathEntityConverterLanguageTest
- Test administration path based conversion of entities.
Namespace
Drupal\language\TestsCode
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.', array(
'%label' => 'Spanish',
)));
$this
->assertRaw(t('Loaded %label.', array(
'%label' => 'Español',
)));
$this
->drupalGet('es/admin/language_test/entity_using_original_language/es');
$this
->assertRaw(t('Loaded %label.', array(
'%label' => 'Spanish',
)));
$this
->assertNoRaw(t('Loaded %label.', array(
'%label' => 'Español',
)));
}