? simpletest_assertMail_extender.patch
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.227
diff -u -p -r1.227 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	27 Aug 2010 12:36:53 -0000	1.227
+++ modules/simpletest/drupal_web_test_case.php	27 Aug 2010 21:23:22 -0000
@@ -2977,14 +2977,14 @@ class DrupalWebTestCase extends DrupalTe
   }
 
   /**
-   * Asserts that the most recently sent e-mail message has the given value.
+   * Asserts that the most recently sent e-mail message contains the given value.
    *
-   * The field in $name must have the content described in $value.
+   * The field in $name must contain the content described in $value.
    *
    * @param $name
    *   Name of field or message property to assert. Examples: subject, body, id, ...
    * @param $value
-   *   Value of the field to assert.
+   *   Value of a part of the field to assert.
    * @param $message
    *   Message to display.
    *
@@ -2994,7 +2994,8 @@ class DrupalWebTestCase extends DrupalTe
   protected function assertMail($name, $value = '', $message = '') {
     $captured_emails = variable_get('drupal_test_email_collector', array());
     $email = end($captured_emails);
-    return $this->assertTrue($email && isset($email[$name]) && $email[$name] == $value, $message, t('E-mail'));
+    $match = strstr($email[$name], $value);
+    return $this->assertTrue($email && isset($email[$name]) && $match == TRUE, $message, t('E-mail'));
   }
 
   /**
