Commit b308e022 authored by catch's avatar catch
Browse files

Issue #3145418 by longwave, paulocs, shetpooja04, Spokje, nikitagupta,...

Issue #3145418 by longwave, paulocs, shetpooja04, Spokje, nikitagupta, mondrake, ravi.shankar, sarvjeetsingh, mrinalini9: [November 9, 2020] Remove uses of t() in assertText() calls
parent 104f6cd6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public function testActionConfiguration() {
    $action_id = $edit['id'];

    // Make sure that the new complex action was saved properly.
    $this->assertText(t('The action has been successfully saved.'), "Make sure we get a confirmation that we've successfully saved the complex action.");
    $this->assertText('The action has been successfully saved.', "Make sure we get a confirmation that we've successfully saved the complex action.");
    $this->assertText($action_label, "Make sure the action label appears on the configuration page after we've saved the complex action.");

    // Make another POST request to the action edit page.
@@ -66,7 +66,7 @@ public function testActionConfiguration() {
    $this->assertSession()->statusCodeEquals(200);

    // Make sure that the action updated properly.
    $this->assertText(t('The action has been successfully saved.'), "Make sure we get a confirmation that we've successfully updated the complex action.");
    $this->assertText('The action has been successfully saved.', "Make sure we get a confirmation that we've successfully updated the complex action.");
    $this->assertNoText($action_label, "Make sure the old action label does NOT appear on the configuration page after we've updated the complex action.");
    $this->assertText($new_action_label, "Make sure the action label appears on the configuration page after we've updated the complex action.");

+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public function testSettingsPage() {
      'aggregator_processors[aggregator_test_processor]' => 'aggregator_test_processor',
    ];
    $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, t('Save configuration'));
    $this->assertText(t('The configuration options have been saved.'));
    $this->assertText('The configuration options have been saved.');

    // Check that settings have the correct default value.
    foreach ($edit as $name => $value) {
@@ -45,13 +45,13 @@ public function testSettingsPage() {
    }

    // Check for our test processor settings form.
    $this->assertText(t('Dummy length setting'));
    $this->assertText('Dummy length setting');
    // Change its value to ensure that settingsSubmit is called.
    $edit = [
      'dummy_length' => 100,
    ];
    $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, t('Save configuration'));
    $this->assertText(t('The configuration options have been saved.'));
    $this->assertText('The configuration options have been saved.');
    $this->assertSession()->fieldValueEquals('dummy_length', 100);

    // Make sure settings form is still accessible even after uninstalling a module
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ protected function setUp() {
  public function createFeed($feed_url = NULL, array $edit = []) {
    $edit = $this->getFeedEditArray($feed_url, $edit);
    $this->drupalPostForm('aggregator/sources/add', $edit, t('Save'));
    $this->assertText(t('The feed @name has been added.', ['@name' => $edit['title[0][value]']]), new FormattableMarkup('The feed @name has been added.', ['@name' => $edit['title[0][value]']]));
    $this->assertText('The feed ' . Html::escape($edit['title[0][value]']) . ' has been added.', new FormattableMarkup('The feed @name has been added.', ['@name' => $edit['title[0][value]']]));

    // Verify that the creation message contains a link to a feed.
    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "aggregator/sources/")]');
+3 −3
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ public function validateImportFormFields() {

    $edit = ['remote' => 'invalidUrl://empty'];
    $this->drupalPostForm('admin/config/services/aggregator/add/opml', $edit, t('Import'));
    $this->assertText(t('The URL invalidUrl://empty is not valid.'), 'Error if the URL is invalid.');
    $this->assertText('The URL invalidUrl://empty is not valid.', 'Error if the URL is invalid.');

    $after = $count_query->execute();
    $this->assertEqual($before, $after, 'No feeds were added during the three last form submissions.');
@@ -89,11 +89,11 @@ protected function submitImportForm() {

    $form['files[upload]'] = $this->getInvalidOpml();
    $this->drupalPostForm('admin/config/services/aggregator/add/opml', $form, t('Import'));
    $this->assertText(t('No new feed has been added.'), 'Attempting to upload invalid XML.');
    $this->assertText('No new feed has been added.', 'Attempting to upload invalid XML.');

    $edit = ['remote' => file_create_url($this->getEmptyOpml())];
    $this->drupalPostForm('admin/config/services/aggregator/add/opml', $edit, t('Import'));
    $this->assertText(t('No new feed has been added.'), 'Attempting to load empty OPML from remote URL.');
    $this->assertText('No new feed has been added.', 'Attempting to load empty OPML from remote URL.');

    $after = $count_query->execute();
    $this->assertEqual($before, $after, 'No feeds were added during the two last form submissions.');
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public function testUpdateFeedItem() {
    $this->assertSession()->statusCodeEquals(200);

    $this->drupalPostForm('aggregator/sources/add', $edit, t('Save'));
    $this->assertText(t('The feed @name has been added.', ['@name' => $edit['title[0][value]']]), new FormattableMarkup('The feed @name has been added.', ['@name' => $edit['title[0][value]']]));
    $this->assertText('The feed ' . $edit['title[0][value]'] . ' has been added.', new FormattableMarkup('The feed @name has been added.', ['@name' => $edit['title[0][value]']]));

    // Verify that the creation message contains a link to a feed.
    $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "aggregator/sources/")]');
Loading