diff --git a/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarMenuTranslationTest.php b/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarMenuTranslationTest.php index 83390f3..5ba2430 100644 --- a/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarMenuTranslationTest.php +++ b/core/modules/toolbar/lib/Drupal/toolbar/Tests/ToolbarMenuTranslationTest.php @@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase; /** - * Tests the translation of menu items and the correctness of assigned classes + * Tests maintaining inclusion of icons for translationed menu items. */ class ToolbarMenuTranslationTest extends WebTestBase { @@ -90,16 +90,18 @@ function testToolbarClasses() { 'translation' => 'translated', ); $this->drupalPost('admin/config/regional/translate/translate', $search, t('Filter')); - // Make sure will be able to translate the menu item. + // Make sure the menu item string was translated. $this->assertText($menu_item_translated, 'Search found the menu item as translated: ' . $menu_item_translated . '.'); // Go to another page in the custom language and make sure the menu item // was translated. $this->drupalGet($langcode . '/admin/structure'); - $this->assertText($menu_item_translated, t('Search found the menu translated.')); + $this->assertText($menu_item_translated, t('Found the menu translated.')); - // Tests if the menu item class changes. + // The icons are included based on the menu item class link title. Test that + // class remains the same after translation. $xpath = $this->xpath('//a[contains(@class, "icon-structure")]'); - $this->assertEqual(count($xpath), 1, "The menu item class doesn't change."); + $this->assertEqual(count($xpath), 1, "The menu item class is the same."); } + }