summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-06-03 13:45:07 +0000
committerDries Buytaert <dries@buytaert.net>2008-06-03 13:45:07 +0000
commitcccf98aaa09e556efcd075534da73774ac144bc0 (patch)
tree0aa2650e4011bccb78e24e63b398e21beca61e11 /modules/simpletest
parent4cdbf9c0786ee79ef9a44acf194340d917407399 (diff)
downloadbrdo-cccf98aaa09e556efcd075534da73774ac144bc0.tar.gz
brdo-cccf98aaa09e556efcd075534da73774ac144bc0.tar.bz2
- Patch #265809 by dropcube: fixed some typos.
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/drupal_web_test_case.php32
1 files changed, 18 insertions, 14 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 946777eda..1d90bd866 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -559,10 +559,8 @@ class DrupalWebTestCase extends UnitTestCase {
}
/**
- * Do a post request on a drupal page.
- * It will be done as usual post request with SimpleBrowser
- * By $reporting you specify if this request does assertions or not
- * Warning: empty ("") returns will cause fails with $reporting
+ * Execute a POST request on a Drupal page.
+ * It will be done as usual POST request with SimpleBrowser.
*
* @param string $path
* Location of the post form. Either a Drupal path or an absolute path or
@@ -572,7 +570,7 @@ class DrupalWebTestCase extends UnitTestCase {
* (where possible) to the values indicated. A checkbox can be set to
* TRUE to be checked and FALSE to be unchecked.
* @param string $submit
- * Untranslated value, id or name of the submit button.
+ * Value of the submit button.
* @param $tamper
* If this is set to TRUE then you can post anything, otherwise hidden and
* nonexistent fields are not posted.
@@ -600,7 +598,7 @@ class DrupalWebTestCase extends UnitTestCase {
$action = isset($form['action']) ? $this->getAbsoluteUrl($form['action']) : $this->getUrl();
}
// We post only if we managed to handle every field in edit and the
- // submit button matches;
+ // submit button matches.
if (!$edit && $submit_matches) {
// This part is not pretty. There is very little I can do.
if ($upload) {
@@ -618,14 +616,15 @@ class DrupalWebTestCase extends UnitTestCase {
$post_array = $post;
$post = array();
foreach ($post_array as $key => $value) {
- // Whethet this needs to be urlencode or rawurlencode, is not
+ // Whether this needs to be urlencode or rawurlencode, is not
// quite clear, but this seems to be the better choice.
$post[] = urlencode($key) . '=' . urlencode($value);
}
$post = implode('&', $post);
}
$out = $this->curlExec(array(CURLOPT_URL => $action, CURLOPT_POSTFIELDS => $post, CURLOPT_POST => TRUE));
- $this->refreshVariables(); // Ensure that any changes to variables in the other thread are picked up.
+ // Ensure that any changes to variables in the other thread are picked up.
+ $this->refreshVariables();
return $out;
}
}
@@ -640,14 +639,19 @@ class DrupalWebTestCase extends UnitTestCase {
/**
* Handle form input related to drupalPost(). Ensure that the specified fields
- * exist and attempt to create POST data in the correct manor for the particular
+ * exist and attempt to create POST data in the correct manner for the particular
* field type.
*
- * @param array $post Reference to array of post values.
- * @param array $edit Reference to array of edit values to be checked against the form.
- * @param string $submit Form submit button value.
- * @param array $form Array of form elements.
- * @return boolean Submit value matches a valid submit input in the form.
+ * @param array $post
+ * Reference to array of post values.
+ * @param array $edit
+ * Reference to array of edit values to be checked against the form.
+ * @param string $submit
+ * Form submit button value.
+ * @param array $form
+ * Array of form elements.
+ * @return boolean
+ * Submit value matches a valid submit input in the form.
*/
protected function handleForm(&$post, &$edit, &$upload, $submit, $form) {
// Retrieve the form elements.