summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/ajax.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-30 08:07:55 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-30 08:07:55 +0000
commit8c08ea2561b6da5a97777312ebf60d295dbbdb1e (patch)
tree5502b1254664920ff775b717cab4c136239ebb08 /modules/simpletest/tests/ajax.test
parent466f693276617c8def2c72601c402e7be4b21ad0 (diff)
downloadbrdo-8c08ea2561b6da5a97777312ebf60d295dbbdb1e.tar.gz
brdo-8c08ea2561b6da5a97777312ebf60d295dbbdb1e.tar.bz2
- Patch #645800 by katbailey, effulgentsia, rfay: ajax_deliver() ignores #ajax['method'] and incorrectly forces 'replaceWith' for simple AJAX callbacks, D6-&gt;D7 regression.
Diffstat (limited to 'modules/simpletest/tests/ajax.test')
-rw-r--r--modules/simpletest/tests/ajax.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/simpletest/tests/ajax.test b/modules/simpletest/tests/ajax.test
index 80ea29f58..97cd2f5d2 100644
--- a/modules/simpletest/tests/ajax.test
+++ b/modules/simpletest/tests/ajax.test
@@ -146,6 +146,11 @@ class AJAXCommandsTestCase extends AJAXTestCase {
$command = $commands[0];
$this->assertTrue($command['command'] == 'insert' && $command['method'] == 'html' && $command['data'] == 'replacement text', "'html' AJAX command issued with correct data");
+ // Tests the 'insert' command.
+ $commands = $this->discardSettings($this->drupalPostAJAX($form_path, $edit, array('op' => t("AJAX insert: Let client insert based on #ajax['method']."))));
+ $command = $commands[0];
+ $this->assertTrue($command['command'] == 'insert' && $command['method'] == NULL && $command['data'] == 'insert replacement text', "'insert' AJAX command issued with correct data");
+
// Tests the 'prepend' command.
$commands = $this->discardSettings($this->drupalPostAJAX($form_path, $edit, array('op' => t("AJAX 'prepend': Click to prepend something"))));
$command = $commands[0];