Commit 6d4eefc3 authored by catch's avatar catch
Browse files

Issue #3184493 by longwave, ravi.shankar, Pooja Ganjage, mondrake: Remove use...

Issue #3184493 by longwave, ravi.shankar, Pooja Ganjage, mondrake: Remove use of concatenated t() in assertions

(cherry picked from commit 9e8c0511)
parent d2debc75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public function testBlockNotInHiddenRegion() {

    // Ensure that "block_test_theme" is set as the default theme.
    $this->drupalGet('admin/structure/block');
    $this->assertText('Block test theme(' . t('active tab') . ')', 'Default local task on blocks admin page is the block test theme.');
    $this->assertSession()->pageTextContains('Block test theme(active tab)');

    // Ensure that the search form block is displayed.
    $this->drupalGet('');
+2 −1
Original line number Diff line number Diff line
@@ -43,8 +43,9 @@ public function testNonDefaultBlockAdmin() {
    $this->drupalLogin($admin_user);
    $new_theme = 'bartik';
    \Drupal::service('theme_installer')->install([$new_theme]);
    // Ensure that the Bartik tab is shown.
    $this->drupalGet('admin/structure/block/list/' . $new_theme);
    $this->assertText('Bartik(' . t('active tab') . ')', 'Tab for non-default theme found.');
    $this->assertSession()->pageTextContains('Bartik(active tab)');
  }

}
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public function testCommentInterface() {
    $this->drupalGet('comment/' . $comment->id() . '/edit');
    $comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), ['name' => $random_name]);
    $this->drupalGet('node/' . $this->node->id());
    $this->assertText($random_name . ' (' . t('not verified') . ')', 'Comment author successfully changed to an unverified user.');
    $this->assertSession()->pageTextContains($random_name . ' (not verified)');

    // Test changing the comment author to a verified user.
    $this->drupalGet('comment/' . $comment->id() . '/edit');
+15 −15
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ protected function doBlockListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -157,7 +157,7 @@ protected function doMenuListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -182,7 +182,7 @@ protected function doVocabularyListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -207,7 +207,7 @@ public function doCustomContentTypeListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -231,7 +231,7 @@ public function doContactFormsListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -254,7 +254,7 @@ public function doContentTypeListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -278,7 +278,7 @@ public function doFormatsListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -302,7 +302,7 @@ public function doShortcutListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -323,7 +323,7 @@ public function doUserRoleListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -343,7 +343,7 @@ public function doLanguageListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -359,7 +359,7 @@ public function doImageStyleListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -383,7 +383,7 @@ public function doResponsiveImageListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -435,7 +435,7 @@ public function doFieldListTest() {

      // Test if the link to translate actually goes to the translate page.
      $this->drupalGet($translate_link);
      $this->assertRaw('<th>' . t('Language') . '</th>');
      $this->assertSession()->responseContains('<th>Language</th>');
    }
  }

@@ -452,7 +452,7 @@ public function doDateFormatListTest() {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
@@ -471,7 +471,7 @@ public function doSettingsPageTest($link) {

    // Test if the link to translate actually goes to the translate page.
    $this->drupalGet($translate_link);
    $this->assertRaw('<th>' . t('Language') . '</th>');
    $this->assertSession()->responseContains('<th>Language</th>');
  }

  /**
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public function testMapperListPage() {
      $title = $test_entity->label() . ' ' . $entity_type->getSingularLabel();
      $title = 'Translations for <em class="placeholder">' . Html::escape($title) . '</em>';
      $this->assertRaw($title);
      $this->assertRaw('<th>' . t('Language') . '</th>');
      $this->assertSession()->responseContains('<th>Language</th>');

      $this->drupalGet($base_url);
      $this->assertSession()->linkExists('Translate test configuration');
Loading