Closed (works as designed)
Project:
Drupal core
Version:
7.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2010 at 21:38 UTC
Updated:
31 Aug 2010 at 10:36 UTC
Currently assertMail() only returns TRUE if the given $value is identical with the field ('body', 'id' ...) of the e-mail. This makes it hard to write tests for the content of larger e-mails which often contain dynamic text.
Additional helper functions have to be written inside the tests that capture the entire e-mail into a new variable to then parse it.
This might also explain the lack of tests for the content of e-mails which leads to problems like here: #893276: Need tests for activation link in new user e-mail
The attached patch modifies assertMail() so that it also returns TRUE if only a part of the field-content is given as $value.
| Comment | File | Size | Author |
|---|---|---|---|
| simpletest_assertMail_extender.patch | 1.68 KB | reglogge |
Comments
Comment #2
reglogge commentedHow stupid of me: assertMailString() does exactly that...