summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2011-01-28 07:01:03 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2011-01-28 07:01:03 +0000
commitd5d1366e6b085a28f88f6d7dab49f1bcb2c8bfc1 (patch)
treea91575af8740f0d16cf64ea9d4b5498d72803ddc /modules
parentf69f43dee320d78c77126e565d76b571a9a5ff1d (diff)
downloadbrdo-d5d1366e6b085a28f88f6d7dab49f1bcb2c8bfc1.tar.gz
brdo-d5d1366e6b085a28f88f6d7dab49f1bcb2c8bfc1.tar.bz2
#789186 follow-up by eojthebrave: Better documentation for drupalPostAJAX()
Diffstat (limited to 'modules')
-rw-r--r--modules/simpletest/drupal_web_test_case.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index fa9917d77..17cbb1ffa 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1892,6 +1892,39 @@ class DrupalWebTestCase extends DrupalTestCase {
* array of commands, to update $this->content using equivalent DOM
* manipulation as is used by ajax.js. It also returns the array of commands.
*
+ * @param $path
+ * Location of the form containing the AJAX enabled element to test. Can be
+ * either a Drupal path or an absolute path or NULL to use the current page.
+ * @param $edit
+ * Field data in an associative array. Changes the current input fields
+ * (where possible) to the values indicated.
+ * @param $triggering_element
+ * The name of the form element that is responsible for triggering the AJAX
+ * functionality to test. May be a string or, if the triggering element is
+ * a button, an associative array where the key is the name of the button
+ * and the value is the button label. i.e.) array('op' => t('Refresh')).
+ * @param $ajax_path
+ * (optional) Override the path set by the AJAX settings of the triggering
+ * element. In the absence of both the triggering element's AJAX path and
+ * $ajax_path 'system/ajax' will be used.
+ * @param $options
+ * (optional) Options to be forwarded to url().
+ * @param $headers
+ * (optional) An array containing additional HTTP request headers, each
+ * formatted as "name: value". Forwarded to drupalPost().
+ * @param $form_html_id
+ * (optional) HTML ID of the form to be submitted, use when there is more
+ * than one identical form on the same page and the value of the triggering
+ * element is not enough to identify the form. Note this is not the Drupal
+ * ID of the form but rather the HTML ID of the form.
+ * @param $ajax_settings
+ * (optional) An array of AJAX settings which if specified will be used in
+ * place of the AJAX settings of the triggering element.
+ *
+ * @return
+ * An array of AJAX commands.
+ *
+ * @see drupalPost()
* @see ajax.js
*/
protected function drupalPostAJAX($path, $edit, $triggering_element, $ajax_path = NULL, array $options = array(), array $headers = array(), $form_html_id = NULL, $ajax_settings = NULL) {