diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php index 935e229..4994430 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockListTest.php @@ -40,7 +40,7 @@ public function testListing() { $this->drupalGet('admin/structure/custom-blocks'); // Test for the page title. - $this->assertTitle('Custom blocks | Drupal'); + $this->assertTitle(t('Custom blocks | Drupal')); // Test for the table. $element = $this->xpath('//div[@class="l-content"]//table'); @@ -51,14 +51,14 @@ public function testListing() { $this->assertEqual(count($elements), 2, 'Correct number of table header cells found.'); // Test the contents of each th cell. - $expected_items = array('Label', 'Operations'); + $expected_items = array(t('Label'), t('Operations')); foreach ($elements as $key => $element) { $this->assertIdentical((string) $element[0], $expected_items[$key]); } // Add a new entity using the operations link. - $this->assertLink('Add custom block'); - $this->clickLink('Add custom block'); + $this->assertLink(t('Add custom block')); + $this->clickLink(t('Add custom block')); $this->assertResponse(200); $edit = array(); $langcode = Language::LANGCODE_NOT_SPECIFIED; @@ -68,7 +68,7 @@ public function testListing() { // Confirm that once the user returns to the listing, the text of the label // (versus elsewhere on the page). - $this->assertFieldByXpath('//td', 'Antelope', "Label found for added block."); + $this->assertFieldByXpath('//td', t('Antelope'), "Label found for added block."); // Check the number of table row cells. $elements = $this->xpath('//div[@class="l-content"]//table/tbody/tr[@class="odd"]/td'); @@ -76,7 +76,7 @@ public function testListing() { // Check the contents of each row cell. The first cell contains the label, // the second contains the machine name, and the third contains the // operations list. - $this->assertIdentical((string) $elements[0], 'Antelope'); + $this->assertIdentical((string) $elements[0], t('Antelope')); // Edit the entity using the operations link. $blocks = $this->container @@ -86,7 +86,7 @@ public function testListing() { $block = reset($blocks); if (!empty($block)) { $this->assertLinkByHref('block/' . $block->id()); - $this->clickLink('Edit'); + $this->clickLink(t('Edit')); $this->assertResponse(200); $this->assertTitle(t('Edit custom block Antelope | Drupal')); $edit = array('info' => 'Albatross'); @@ -98,18 +98,18 @@ public function testListing() { // Confirm that once the user returns to the listing, the text of the label // (versus elsewhere on the page). - $this->assertFieldByXpath('//td', 'Albatross', "Label found for updated 'Albatross' entity."); + $this->assertFieldByXpath('//td', t('Albatross'), "Label found for updated 'Albatross' entity."); // Delete the added entity using the operations link. $this->assertLinkByHref('block/' . $block->id() . '/delete'); - $this->clickLink('Delete'); + $this->clickLink(t('Delete')); $this->assertResponse(200); $this->assertTitle(t('Are you sure you want to delete Albatross? | Drupal')); $this->drupalPost(NULL, array(), t('Delete')); // Verify that the text of the label and machine name does not appear in // the list (though it may appear elsewhere on the page). - $this->assertNoFieldByXpath('//td', 'Albatross', "No label found for deleted 'Albatross' entity."); + $this->assertNoFieldByXpath('//td', t('Albatross'), "No label found for deleted 'Albatross' entity."); // Confirm that the empty text is displayed. $this->assertText(t('There is no Custom Block yet.'));