Skip to main content
edited tags
Link
Joe Beuckman
  • 1.1k
  • 13
  • 35
Source Link
Joe Beuckman
  • 1.1k
  • 13
  • 35

SimpleTest: How to make multiple Ajax posts and then save the data?

I have a form with AJAX buttons that add items to a list. To SimpleTest the form, I need to make the AJAX post:

$this->drupalPostAJAX(NULL, $edit, array('op' => 'Add Item Button'));

...then POST the resulting $edit object with the Save button.

$this->drupalPost('admin/structure/fms_report/create', $edit, t('Save'));

My question is, how do I get the resulting $edit object after the first AJAX POST happens?