BasicSmokeTest.php 760B

123456789101112131415161718192021222324252627
  1. <?php
  2. require_once 'swift_required.php';
  3. require_once 'Swift/Tests/SwiftSmokeTestCase.php';
  4. class Swift_Smoke_BasicSmokeTest extends Swift_Tests_SwiftSmokeTestCase
  5. {
  6. public function testBasicSending()
  7. {
  8. $mailer = $this->_getMailer();
  9. $message = Swift_Message::newInstance()
  10. ->setSubject('[Swift Mailer] BasicSmokeTest')
  11. ->setFrom(array(SWIFT_SMOKE_EMAIL_ADDRESS => 'Swift Mailer'))
  12. ->setTo(SWIFT_SMOKE_EMAIL_ADDRESS)
  13. ->setBody('One, two, three, four, five...' . PHP_EOL .
  14. 'six, seven, eight...'
  15. )
  16. ;
  17. $this->assertEqual(1, $mailer->send($message),
  18. '%s: The smoke test should send a single message'
  19. );
  20. $this->_visualCheck('http://swiftmailer.org/smoke/4.0.0/basic.jpg');
  21. }
  22. }