Commit 0432bc86 authored by catch's avatar catch
Browse files

Issue #2080113 by deneo, rhm50: Remove Unused local variable $plugin_id from...

Issue #2080113 by deneo, rhm50: Remove Unused local variable $plugin_id from /core/modules/system/lib/Drupal/system/Tests/Plugin/CacheDecoratorLanguageTest.php.
parent e2779851
......@@ -65,7 +65,7 @@ public function setUp() {
$languages[$langcode] = language_save($language);
// Set up translations for each mock block label.
$custom_strings = array();
foreach ($this->mockBlockExpectedDefinitions as $plugin_id => $definition) {
foreach ($this->mockBlockExpectedDefinitions as $definition) {
$custom_strings[$definition['label']] = $langcode . ' ' . $definition['label'];
}
$this->addCustomTranslations($langcode, array('' => $custom_strings));
......@@ -80,7 +80,7 @@ public function setUp() {
public function testCacheDecoratorLanguage() {
$languages = $this->languages;
$this->drupalGet('plugin_definition_test');
foreach ($this->mockBlockExpectedDefinitions as $plugin_id => $definition) {
foreach ($this->mockBlockExpectedDefinitions as $definition) {
// Find our source text.
$this->assertText($definition['label']);
}
......@@ -88,7 +88,7 @@ public function testCacheDecoratorLanguage() {
$url = $langcode . '/plugin_definition_test';
// For each language visit the language specific version of the page again.
$this->drupalGet($url);
foreach ($this->mockBlockExpectedDefinitions as $plugin_id => $definition) {
foreach ($this->mockBlockExpectedDefinitions as $definition) {
// Find our provided translations.
$label = $langcode . ' ' . $definition['label'];
$this->assertText($label);
......@@ -110,13 +110,13 @@ public function testCacheDecoratorLanguage() {
}
// Change the translations for the german language and recheck strings.
$custom_strings = array();
foreach ($this->mockBlockExpectedDefinitions as $plugin_id => $definition) {
foreach ($this->mockBlockExpectedDefinitions as $definition) {
$custom_strings[$definition['label']] = $definition['label'] . ' de';
}
$this->addCustomTranslations('de', array('' => $custom_strings));
$this->writeCustomTranslations();
$this->drupalGet('de/plugin_definition_test');
foreach ($this->mockBlockExpectedDefinitions as $plugin_id => $definition) {
foreach ($this->mockBlockExpectedDefinitions as $definition) {
// Find our provided translations.
$label = $definition['label'] . ' de';
$this->assertText($label);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment