AllTests.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Mail
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
  23. if (!defined('PHPUnit_MAIN_METHOD')) {
  24. define('PHPUnit_MAIN_METHOD', 'Zend_Mail_AllTests::main');
  25. }
  26. require_once 'Zend/Mail/MailTest.php';
  27. require_once 'Zend/Mail/MboxTest.php';
  28. require_once 'Zend/Mail/MboxMessageOldTest.php';
  29. require_once 'Zend/Mail/MboxFolderTest.php';
  30. require_once 'Zend/Mail/MaildirTest.php';
  31. require_once 'Zend/Mail/MaildirMessageOldTest.php';
  32. require_once 'Zend/Mail/MaildirFolderTest.php';
  33. require_once 'Zend/Mail/MaildirWritableTest.php';
  34. require_once 'Zend/Mail/Pop3Test.php';
  35. require_once 'Zend/Mail/ImapTest.php';
  36. require_once 'Zend/Mail/InterfaceTest.php';
  37. require_once 'Zend/Mail/MessageTest.php';
  38. require_once 'Zend/Mail/SmtpTest.php';
  39. /**
  40. * @category Zend
  41. * @package Zend_Mail
  42. * @subpackage UnitTests
  43. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  44. * @license http://framework.zend.com/license/new-bsd New BSD License
  45. * @group Zend_Mail
  46. */
  47. class Zend_Mail_AllTests
  48. {
  49. public static function main()
  50. {
  51. PHPUnit_TextUI_TestRunner::run(self::suite());
  52. }
  53. public static function suite()
  54. {
  55. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Mail');
  56. $suite->addTestSuite('Zend_Mail_MailTest');
  57. $suite->addTestSuite('Zend_Mail_MessageTest');
  58. $suite->addTestSuite('Zend_Mail_InterfaceTest');
  59. $suite->addTestSuite('Zend_Mail_MboxTest');
  60. $suite->addTestSuite('Zend_Mail_MboxMessageOldTest');
  61. $suite->addTestSuite('Zend_Mail_MboxFolderTest');
  62. if (defined('TESTS_ZEND_MAIL_POP3_ENABLED') && constant('TESTS_ZEND_MAIL_POP3_ENABLED') == true) {
  63. $suite->addTestSuite('Zend_Mail_Pop3Test');
  64. }
  65. if (defined('TESTS_ZEND_MAIL_IMAP_ENABLED') && constant('TESTS_ZEND_MAIL_IMAP_ENABLED') == true) {
  66. $suite->addTestSuite('Zend_Mail_ImapTest');
  67. }
  68. if (defined('TESTS_ZEND_MAIL_MAILDIR_ENABLED') && constant('TESTS_ZEND_MAIL_MAILDIR_ENABLED')) {
  69. $suite->addTestSuite('Zend_Mail_MaildirTest');
  70. $suite->addTestSuite('Zend_Mail_MaildirMessageOldTest');
  71. $suite->addTestSuite('Zend_Mail_MaildirFolderTest');
  72. $suite->addTestSuite('Zend_Mail_MaildirWritableTest');
  73. }
  74. if (defined('TESTS_ZEND_MAIL_SMTP_ENABLED') && constant('TESTS_ZEND_MAIL_SMTP_ENABLED') == true) {
  75. $suite->addTestSuite('Zend_Mail_SmtpTest');
  76. }
  77. return $suite;
  78. }
  79. }
  80. if (PHPUnit_MAIN_METHOD == 'Zend_Mail_AllTests::main') {
  81. Zend_Mail_AllTests::main();
  82. }