summaryrefslogtreecommitdiffstatshomepage
path: root/modules/simpletest/tests/ajax.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-29 03:00:50 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-11-29 03:00:50 +0000
commit4e90d24dd9ff1474bf679f70a351dee371e87b51 (patch)
tree29a273840a1c145fcd5e43ca39a7c04504842a7e /modules/simpletest/tests/ajax.test
parentff119bc0ccfa224279456c901904955a6b1f4d05 (diff)
downloaddrupal-4e90d24dd9ff1474bf679f70a351dee371e87b51.tar.gz
drupal-4e90d24dd9ff1474bf679f70a351dee371e87b51.zip
#818660 by yched, sun: Provide an AJAX command to invoke simple jQuery methods.
Diffstat (limited to 'modules/simpletest/tests/ajax.test')
-rw-r--r--modules/simpletest/tests/ajax.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/simpletest/tests/ajax.test b/modules/simpletest/tests/ajax.test
index 2788d4f90b77..2a2469334d39 100644
--- a/modules/simpletest/tests/ajax.test
+++ b/modules/simpletest/tests/ajax.test
@@ -211,6 +211,15 @@ class AJAXCommandsTestCase extends AJAXTestCase {
);
$this->assertCommand($commands, $expected, "'data' AJAX command issued with correct key and value");
+ // Tests the 'invoke' command.
+ $commands = $this->drupalPostAJAX($form_path, $edit, array('op' => t("AJAX invoke command: Invoke addClass() method.")));
+ $expected = array(
+ 'command' => 'invoke',
+ 'method' => 'addClass',
+ 'arguments' => array('error'),
+ );
+ $this->assertCommand($commands, $expected, "'invoke' AJAX command issued with correct method and argument");
+
// Tests the 'html' command.
$commands = $this->drupalPostAJAX($form_path, $edit, array('op' => t("AJAX html: Replace the HTML in a selector.")));
$expected = array(