Skip to content
Snippets Groups Projects
Commit 02ce89c4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2407907 by YesCT, mr.york: Configuration translation entity listings...

Issue #2407907 by YesCT, mr.york: Configuration translation entity listings displays items overriden
parent 1a5db186
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
namespace Drupal\config_translation\Controller; namespace Drupal\config_translation\Controller;
use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder; use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
/** /**
* Defines the configuration translation list builder for entities. * Defines the configuration translation list builder for entities.
*/ */
class ConfigTranslationEntityListBuilder extends EntityListBuilder implements ConfigTranslationEntityListBuilderInterface { class ConfigTranslationEntityListBuilder extends ConfigEntityListBuilder implements ConfigTranslationEntityListBuilderInterface {
/** /**
* Provides user facing strings for the filter element. * Provides user facing strings for the filter element.
......
...@@ -120,4 +120,27 @@ public function testHiddenEntities() { ...@@ -120,4 +120,27 @@ public function testHiddenEntities() {
$this->assertLinkByHref('admin/config/regional/date-time/formats/manage/html_year/translate'); $this->assertLinkByHref('admin/config/regional/date-time/formats/manage/html_year/translate');
} }
/**
* Tests that overrides do not affect listing screens.
*/
public function testListingPageWithOverrides() {
$original_label = 'Default';
$overridden_label = 'Overridden label';
// 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_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);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment