Closed (fixed)
Project:
SimpleTest
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2010 at 07:25 UTC
Updated:
10 Sep 2010 at 15:20 UTC
As far as I understand it, with assertMail we can test for the presence of only the complete content of fields like "subject" or "body". Is there a way to test for only a small part of the body being present? E.g. a specific link in an e-mail body or a string in the subject?
Comments
Comment #1
reglogge commentedFound the solution at http://www.comm-press.de/blog/simple-test-mit-drupal (in German).
Create a function inside your test like this to parse the entire mail:
then you can assert any content like this:
Neat!