public function ConfigTranslationOverviewTest::testListingPageWithOverrides in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php \Drupal\config_translation\Tests\ConfigTranslationOverviewTest::testListingPageWithOverrides()
Tests that overrides do not affect listing screens.
File
- core/
modules/ config_translation/ src/ Tests/ ConfigTranslationOverviewTest.php, line 155 - Contains \Drupal\config_translation\Tests\ConfigTranslationOverviewTest.
Class
- ConfigTranslationOverviewTest
- Translate settings and entities to various languages.
Namespace
Drupal\config_translation\TestsCode
public function testListingPageWithOverrides() {
$original_label = 'Default';
$overridden_label = 'Overridden label';
$config_test_storage = $this->container
->get('entity.manager')
->getStorage('config_test');
// Set up an override.
$settings['config']['config_test.dynamic.dotted.default']['label'] = (object) array(
'value' => $overridden_label,
'required' => TRUE,
);
$this
->writeSettings($settings);
// Test that the overridden label is loaded with the entity.
$this
->assertEqual($config_test_storage
->load('dotted.default')
->label(), $overridden_label);
// Test that the original label on the listing page is intact.
$this
->drupalGet('admin/config/regional/config-translation/config_test');
$this
->assertText($original_label);
$this
->assertNoText($overridden_label);
}