summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/form.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/form.test')
-rw-r--r--modules/simpletest/tests/form.test6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index c3ef7fd9d..969f3f398 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -996,11 +996,7 @@ class FormsRebuildTestCase extends DrupalWebTestCase {
// submission and verify it worked by ensuring the updated page has two text
// field items in the field for which we just added an item.
$this->drupalGet('node/add/page');
- preg_match('/jQuery\.extend\(Drupal\.settings, (.*?)\);/', $this->content, $matches);
- $settings = drupal_json_decode($matches[1]);
- $button = $this->xpath('//input[@name="field_ajax_test_add_more"]');
- $button_id = (string) $button[0]['id'];
- $this->drupalPostAJAX(NULL, array(), array('field_ajax_test_add_more' => t('Add another item')), 'system/ajax', array(), array(), 'page-node-form', $settings['ajax'][$button_id]);
+ $this->drupalPostAJAX(NULL, array(), array('field_ajax_test_add_more' => t('Add another item')), 'system/ajax', array(), array(), 'page-node-form');
$this->assert(count($this->xpath('//div[contains(@class, "field-name-field-ajax-test")]//input[@type="text"]')) == 2, t('AJAX submission succeeded.'));
// Submit the form with the non-AJAX "Save" button, leaving the title field