File tree 1 file changed +18
-4
lines changed
1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,6 @@ Start with an easy controller action that sends an email::
26
26
return $this->render(...);
27
27
}
28
28
29
- .. note ::
30
-
31
- Don't forget to enable the profiler as explained in :doc: `/testing/profiling `.
32
-
33
29
In your functional test, use the ``swiftmailer `` collector on the profiler
34
30
to get information about the messages sent on the previous request::
35
31
@@ -67,4 +63,22 @@ to get information about the messages sent on the previous request::
67
63
}
68
64
}
69
65
66
+ Troubleshooting
67
+ ---------------
68
+
69
+Problem: The collector object is ``null ``
70
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
+
72
+ The email collector is only available when the profiler is enabled and collects
73
+ information, as explained in :doc: `/testing/profiling `.
74
+
75
+ Problem: The collector doesn't contain the email
76
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77
+
78
+ If a redirection is performed after sending the email (for example when you send
79
+ an email after a form is processed and before redirecting to another page), make
80
+ sure that the test client doesn't follow the redirects, as explained in
81
+ :doc: `/testing `. Otherwise, the collector will contain the information of the
82
+ redirected page and the email won't be accessible.
83
+
70
84
.. _`Swift Mailer` : http://swiftmailer.org/
You can’t perform that action at this time.
0 commit comments