如何在功能测试中测试电子邮件发送?
我正在为我的应用程序编写功能测试,但我没有找到如何发送测试邮件(如 sf 1.x 中所示)。官方文档上有教程吗?
I'm writing functional test for my application, but I don't find how test mails are sent (like in sf 1.x). An tutorial exist on official doc ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过分析器来完成此操作。
有一本食谱解释了如何在测试中使用探查器:
http:// symfony.com/doc/current/cookbook/testing/profiling.html
SwiftMailer 应该在分析器中拥有自己的条目:
swiftmailer
You can do it through the profiler.
There is a cookbook explaining how you can use the profiler from your tests:
http://symfony.com/doc/current/cookbook/testing/profiling.html
The SwiftMailer should have its own entry in the profiler:
swiftmailer