diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 81264d1..e89973c 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1169,10 +1169,12 @@ class DrupalWebTestCase extends DrupalTestCase {
    *
    * @param $user
    *   User object representing the user to log in.
+   * @param $destination
+   *   Path where we want to redirect if the user is logged in succesfully.
    *
    * @see drupalCreateUser()
    */
-  protected function drupalLogin(stdClass $user) {
+  protected function drupalLogin(stdClass $user, $destination = '') {
     if ($this->loggedInUser) {
       $this->drupalLogout();
     }
@@ -1181,7 +1183,12 @@ class DrupalWebTestCase extends DrupalTestCase {
       'name' => $user->name,
       'pass' => $user->pass_raw
     );
-    $this->drupalPost('user', $edit, t('Log in'));
+    $options = array();
+    if ($destination) {
+      $query = array('destination' => $destination);
+      $options = array('query' => $query);
+    }
+    $this->drupalPost('user', $edit, t('Log in'), $options);
 
     // If a "log out" link appears on the page, it is almost certainly because
     // the login was successful.
