Commit a60fbb6b authored by catch's avatar catch
Browse files

Issue #2802401 by longwave, sarvjeetsingh, jhedstrom, naresh_bavaskar:...

Issue #2802401 by longwave, sarvjeetsingh, jhedstrom, naresh_bavaskar: Deprecate allowing NULL as $edit parameter to drupalPostForm()
parent 39b62165
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ public function testBooleanField() {
    // Enable setting.
    $edit = ['fields[' . $field_name . '][settings_edit_form][settings][display_label]' => 1];
    $this->drupalPostForm(NULL, $edit, $field_name . "_plugin_settings_update");
    $this->drupalPostForm(NULL, NULL, 'Save');
    $this->drupalPostForm(NULL, [], 'Save');

    // Go again to the form display page and check if the setting
    // is stored and has the expected effect.
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public function testFieldAdminHandler() {
      'name[node_field_data.nid]' => 1,
    ];
    $this->drupalPostForm('admin/structure/views/nojs/add-handler/node_test_view/entity_reference_1/sort', $edit, t('Add and configure sort criteria'));
    $this->drupalPostForm(NULL, NULL, t('Apply'));
    $this->drupalPostForm(NULL, [], t('Apply'));

    $this->drupalPostForm('admin/structure/views/view/node_test_view/edit/entity_reference_1', [], t('Save'));
    $this->clickLink(t('Settings'));
+2 −2
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public function testEntityViewModeUI() {
    // Test deleting the view mode.
    $this->clickLink(t('Delete'));
    $this->assertRaw(t('Are you sure you want to delete the view mode %label?', ['%label' => $edit['label']]));
    $this->drupalPostForm(NULL, NULL, t('Delete'));
    $this->drupalPostForm(NULL, [], t('Delete'));
    $this->assertRaw(t('The view mode %label has been deleted.', ['%label' => $edit['label']]));
  }

@@ -147,7 +147,7 @@ public function testEntityFormModeUI() {
    // Test deleting the form mode.
    $this->clickLink(t('Delete'));
    $this->assertRaw(t('Are you sure you want to delete the form mode %label?', ['%label' => $edit['label']]));
    $this->drupalPostForm(NULL, NULL, t('Delete'));
    $this->drupalPostForm(NULL, [], t('Delete'));
    $this->assertRaw(t('The form mode %label has been deleted.', ['%label' => $edit['label']]));
  }

+1 −1
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ public function testUninstall() {
    $edit = [];
    $edit['uninstall[help_topics]'] = TRUE;
    $this->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
    $this->drupalPostForm(NULL, NULL, t('Uninstall'));
    $this->drupalPostForm(NULL, [], t('Uninstall'));
    $this->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
    $this->drupalGet('admin/help');
    $this->assertSession()->statusCodeEquals(200);
+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public function testFormCheckbox() {
    // the checkbox.
    $this->drupalGet('form-test/checkboxes-zero/1');
    $this->assertSession()->fieldExists('checkbox_off[0]')->check();
    $this->drupalPostForm(NULL, NULL, 'Save');
    $this->drupalPostForm(NULL, [], 'Save');
    $results = json_decode($this->getSession()->getPage()->getContent());
    $this->assertIdentical($results->checkbox_off, ['0', 0, 0], 'The first choice is on in checkbox_off but the rest is not');

@@ -91,7 +91,7 @@ public function testFormCheckbox() {
    // the checkbox.
    $this->drupalGet('form-test/checkboxes-zero/0');
    $this->assertSession()->fieldExists('checkbox_off[0]')->check();
    $this->drupalPostForm(NULL, NULL, 'Save');
    $this->drupalPostForm(NULL, [], 'Save');
    $checkboxes = $this->xpath('//input[@type="checkbox"]');

    $this->assertCount(9, $checkboxes, 'Correct number of checkboxes found.');
Loading