summaryrefslogtreecommitdiff
path: root/modules/field/field.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-27 04:40:12 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-27 04:40:12 +0000
commit0259ee968ffa4db893e57a80931aaf9f8ae69e5e (patch)
treebb1a50b608ee02f5909c4c7f193235f1a9d20140 /modules/field/field.test
parent715d3e54325492cf6ef05f2311faa9a9c8296c15 (diff)
downloadbrdo-0259ee968ffa4db893e57a80931aaf9f8ae69e5e.tar.gz
brdo-0259ee968ffa4db893e57a80931aaf9f8ae69e5e.tar.bz2
#367567 by effulgentsia, yched, quicksketch, sun, and chx: Move AHAH-'add more' to the new generic AHAH callback, and add support for form definition functions being kept in non-.module files.
Diffstat (limited to 'modules/field/field.test')
-rw-r--r--modules/field/field.test10
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/field/field.test b/modules/field/field.test
index 6f7607f8c..d1a717ba5 100644
--- a/modules/field/field.test
+++ b/modules/field/field.test
@@ -1375,8 +1375,7 @@ class FieldFormTestCase extends FieldTestCase {
$pattern[$weight] = "<input [^>]*value=\"$value\" [^>]*";
}
// Press 'add more' button through AHAH.
- $path = 'field/js_add_more/' . str_replace('_', '-', $this->instance['bundle']) . '/' . str_replace('_', '-', $this->instance['field_name']);
- $this->_fieldPostAhah($path, $edit, t('Add another item'));
+ $this->_fieldPostAhah($edit, t('Add another item'));
ksort($values);
$values = array_values($values);
@@ -1401,11 +1400,8 @@ class FieldFormTestCase extends FieldTestCase {
* Since the result is generally not a full-fledged form, this cannot be
* called iteratively.
*/
- function _fieldPostAhah($path, $edit, $submit, array $options = array(), array $headers = array()) {
- // @TODO: the framework should make it possible to submit a form to a
- // different URL than its action or the current. For now, we can just force
- // it.
- $this->additionalCurlOptions[CURLOPT_URL] = url($path, array('absolute' => TRUE));
+ function _fieldPostAhah($edit, $submit, array $options = array(), array $headers = array()) {
+ $this->additionalCurlOptions[CURLOPT_URL] = url('system/ajax', array('absolute' => TRUE));
$this->drupalPost(NULL, $edit, $submit);
unset($this->additionalCurlOptions[CURLOPT_URL]);