Commit 8d344a42 authored by catch's avatar catch
Browse files

Issue #3145005 by longwave, mondrake, cburschka, raman.b, Lal_, dww, xjm:...

Issue #3145005 by longwave, mondrake, cburschka, raman.b, Lal_, dww, xjm: [November 9, 2020] Remove uses of t() in drupalPostForm() calls
parent 2f070fc3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public function testActionConfiguration() {
    // Make a POST request to admin/config/system/actions.
    $edit = [];
    $edit['action'] = 'action_goto_action';
    $this->drupalPostForm('admin/config/system/actions', $edit, t('Create'));
    $this->drupalPostForm('admin/config/system/actions', $edit, 'Create');
    $this->assertSession()->statusCodeEquals(200);

    // Make a POST request to the individual action configuration page.
@@ -46,7 +46,7 @@ public function testActionConfiguration() {
    $edit['label'] = $action_label;
    $edit['id'] = strtolower($action_label);
    $edit['url'] = 'admin';
    $this->drupalPostForm('admin/config/system/actions/add/action_goto_action', $edit, t('Save'));
    $this->drupalPostForm('admin/config/system/actions/add/action_goto_action', $edit, 'Save');
    $this->assertSession()->statusCodeEquals(200);

    $action_id = $edit['id'];
@@ -62,7 +62,7 @@ public function testActionConfiguration() {
    $new_action_label = $this->randomMachineName();
    $edit['label'] = $new_action_label;
    $edit['url'] = 'admin';
    $this->drupalPostForm(NULL, $edit, t('Save'));
    $this->drupalPostForm(NULL, $edit, 'Save');
    $this->assertSession()->statusCodeEquals(200);

    // Make sure that the action updated properly.
@@ -79,7 +79,7 @@ public function testActionConfiguration() {
    $this->clickLink(t('Delete'));
    $this->assertSession()->statusCodeEquals(200);
    $edit = [];
    $this->drupalPostForm(NULL, $edit, t('Delete'));
    $this->drupalPostForm(NULL, $edit, 'Delete');
    $this->assertSession()->statusCodeEquals(200);

    // Make sure that the action was actually deleted.
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ public function testAddFeed() {
      'url[0][value]' => $feed->getUrl(),
      'refresh' => '900',
    ];
    $this->drupalPostForm('aggregator/sources/add', $edit, t('Save'));
    $this->drupalPostForm('aggregator/sources/add', $edit, 'Save');
    $this->assertRaw(t('A feed named %feed already exists. Enter a unique title.', ['%feed' => $feed->label()]));
    $this->assertRaw(t('A feed with this URL %url already exists. Enter a unique URL.', ['%url' => $feed->getUrl()]));

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

    // Check that settings have the correct default value.
@@ -50,7 +50,7 @@ public function testSettingsPage() {
    $edit = [
      'dummy_length' => 100,
    ];
    $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, t('Save configuration'));
    $this->drupalPostForm('admin/config/services/aggregator/settings', $edit, 'Save configuration');
    $this->assertText('The configuration options have been saved.');
    $this->assertSession()->fieldValueEquals('dummy_length', 100);

+4 −4
Original line number Diff line number Diff line
@@ -74,7 +74,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->drupalPostForm('aggregator/sources/add', $edit, 'Save');
    $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.
@@ -92,7 +92,7 @@ public function createFeed($feed_url = NULL, array $edit = []) {
   *   Feed object representing the feed.
   */
  public function deleteFeed(FeedInterface $feed) {
    $this->drupalPostForm('aggregator/sources/' . $feed->id() . '/delete', [], t('Delete'));
    $this->drupalPostForm('aggregator/sources/' . $feed->id() . '/delete', [], 'Delete');
    $this->assertRaw(t('The feed %title has been deleted.', ['%title' => $feed->label()]));
  }

@@ -212,7 +212,7 @@ public function updateFeedItems(FeedInterface $feed, $expected_count = NULL) {
   *   Feed object representing the feed.
   */
  public function deleteFeedItems(FeedInterface $feed) {
    $this->drupalPostForm('admin/config/services/aggregator/delete/' . $feed->id(), [], t('Delete items'));
    $this->drupalPostForm('admin/config/services/aggregator/delete/' . $feed->id(), [], 'Delete items');
    $this->assertRaw(t('The news items from %title have been deleted.', ['%title' => $feed->label()]));
  }

@@ -376,7 +376,7 @@ public function createSampleNodes($count = 5) {
      $edit = [];
      $edit['title[0][value]'] = $this->randomMachineName();
      $edit['body[0][value]'] = $this->randomMachineName();
      $this->drupalPostForm('node/add/article', $edit, t('Save'));
      $this->drupalPostForm('node/add/article', $edit, 'Save');
    }
  }

+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public function testFeedLanguage() {
    $edit['entity_types[aggregator_feed]'] = TRUE;
    $edit['settings[aggregator_feed][aggregator_feed][settings][language][language_alterable]'] = TRUE;

    $this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save configuration'));
    $this->drupalPostForm('admin/config/regional/content-language', $edit, 'Save configuration');

    /** @var \Drupal\aggregator\FeedInterface[] $feeds */
    $feeds = [];
Loading