ton/email-bundle
Composer 安装命令:
composer require ton/email-bundle
包简介
Email bundle for test environment of Symfony2
README 文档
README
Email bundle for test environment of Symfony2. It allows to store emails as *.eml files and read them after that.
Setup
config_test.yml
swiftmailer: transport: file
and 'swiftmailer.transport.file' instead of 'file' for SwiftmailerBundle V2.2.?
Memory transport
PhpUnitTest.php
use Ton\EmailBundle\EventListener\EmailListener; /** * @todo check multiple initialization */ protected function registerEmailListener() { $container = $this->getContainer(); $mailer = $container->get('mailer'); $plugin = new EmailListener(); $mailer->registerPlugin($plugin); return $plugin; } /** * @test */ public function sendEmail() { $email = $this->registerEmailListener(); $email->clean(); // Send Email $this->assertCount(1, $email->getPreSendMessages()); $email->getPreSendMessage(0); }
统计信息
- 总下载量: 340
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-09-13