diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-04-29 07:18:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-04-29 07:18:04 +0000 |
commit | f918903428742febe2a690484d13b0ad4fa2310f (patch) | |
tree | f5c427f6ad2180acde96f6a0bea65aeb19eb048a /modules/simpletest/tests | |
parent | a703b3ee8ae84ccdb9023492f93b8ea5a0fb9cf7 (diff) | |
download | brdo-f918903428742febe2a690484d13b0ad4fa2310f.tar.gz brdo-f918903428742febe2a690484d13b0ad4fa2310f.tar.bz2 |
- Patch #408024 by brianV et al: rename drupal_execute() to drupal_submit_form().
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r-- | modules/simpletest/tests/form.test | 16 | ||||
-rw-r--r-- | modules/simpletest/tests/form_test.module | 18 |
2 files changed, 17 insertions, 17 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test index d787a850f..3dff0fa1f 100644 --- a/modules/simpletest/tests/form.test +++ b/modules/simpletest/tests/form.test @@ -346,33 +346,33 @@ class FormsFormCleanIdFunctionalTest extends DrupalWebTestCase { } /** - * Test using drupal_execute in a batch. + * Test using drupal_form_submit in a batch. */ class FormAPITestCase extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => t('Drupal Execute and Batch API'), - 'description' => t('Tests the compatibility of drupal_execute and the Batch API'), + 'description' => t('Tests the compatibility of drupal_form_submit and the Batch API'), 'group' => t('Form API'), ); } /** - * Check that we can run drupal_execute during a batch. + * Check that we can run drupal_form_submit during a batch. */ - function testDrupalExecuteInBatch() { + function testDrupalFormSubmitInBatch() { // Our test is going to modify the following variable. variable_set('form_test_mock_submit', 'initial_state'); - // This is a page that sets a batch, which calls drupal_execute, which + // This is a page that sets a batch, which calls drupal_form_submit, which // modifies the variable we set up above. - $this->drupalGet('form_test/drupal_execute_batch_api'); + $this->drupalGet('form_test/drupal_form_submit_batch_api'); - // If the drupal_execute call executed correctly our test variable will be + // If the drupal_form_submit call executed correctly our test variable will be // set to 'form_submitted'. - $this->assertEqual('form_submitted', variable_get('form_test_mock_submit', 'initial_state'), t('Check drupal_execute called submit handlers when running in a batch')); + $this->assertEqual('form_submitted', variable_get('form_test_mock_submit', 'initial_state'), t('Check drupal_form_submit called submit handlers when running in a batch')); // Clean our variable up. variable_del('form_test_mock_submit'); diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module index afa08ba89..547de062e 100644 --- a/modules/simpletest/tests/form_test.module +++ b/modules/simpletest/tests/form_test.module @@ -51,9 +51,9 @@ function form_test_menu() { 'type' => MENU_CALLBACK, ); - $items['form_test/drupal_execute_batch_api'] = array( - 'title' => 'BatchAPI Drupal_execute tests', - 'page callback' => 'form_test_drupal_execute_batch_api', + $items['form_test/drupal_form_submit_batch_api'] = array( + 'title' => 'BatchAPI Drupal_form_submit tests', + 'page callback' => 'form_test_drupal_form_submit_batch_api', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); @@ -226,17 +226,17 @@ function _form_test_tableselect_js_select_form($form_state, $action) { } /** - * Page callback for the batch/drupal_execute interaction test. + * Page callback for the batch/drupal_form_submit interaction test. * * When called without any arguments we set up a batch that calls * form_test_batch_callback. That function will submit a form using - * drupal_execute using the values specified in this function. + * drupal_form_submit using the values specified in this function. * * The form's field test_value begins at 'initial_value', and is changed * to 'form_submitted' when the form is submitted successfully. On * completion this function is passed 'done' to complete the process. */ -function form_test_drupal_execute_batch_api($arg = '') { +function form_test_drupal_form_submit_batch_api($arg = '') { // If we're at the end of the batch process, return. if ($arg == 'done') { return t('Done'); @@ -249,15 +249,15 @@ function form_test_drupal_execute_batch_api($arg = '') { // Set the batch and process it. batch_set($batch); - batch_process('form_test/drupal_execute_batch_api/done'); + batch_process('form_test/drupal_form_submit_batch_api/done'); } /** - * Submits form_test_mock_form using drupal_execute using the given $value. + * Submits form_test_mock_form using drupal_form_submit using the given $value. */ function form_test_batch_callback($value) { $state['values']['test_value'] = $value; - drupal_execute('form_test_mock_form', $state); + drupal_form_submit('form_test_mock_form', $state); } /** |