2
0

AllTests.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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-2009 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. if (!defined('PHPUnit_MAIN_METHOD')) {
  23. define('PHPUnit_MAIN_METHOD', 'Zend_Mail_AllTests::main');
  24. }
  25. /**
  26. * Test helper
  27. */
  28. require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
  29. if (!defined('TESTS_ZEND_MAIL_POP3_ENABLED')) {
  30. if (is_readable('TestConfiguration.php')) {
  31. require_once 'TestConfiguration.php';
  32. } else {
  33. require_once 'TestConfiguration.php.dist';
  34. }
  35. }
  36. require_once 'PHPUnit/Framework/TestSuite.php';
  37. require_once 'PHPUnit/TextUI/TestRunner.php';
  38. require_once 'Zend/Mail/MboxTest.php';
  39. require_once 'Zend/Mail/MboxMessageOldTest.php';
  40. require_once 'Zend/Mail/MboxFolderTest.php';
  41. require_once 'Zend/Mail/MaildirTest.php';
  42. require_once 'Zend/Mail/MaildirMessageOldTest.php';
  43. require_once 'Zend/Mail/MaildirFolderTest.php';
  44. require_once 'Zend/Mail/MaildirWritableTest.php';
  45. require_once 'Zend/Mail/Pop3Test.php';
  46. require_once 'Zend/Mail/ImapTest.php';
  47. require_once 'Zend/Mail/InterfaceTest.php';
  48. require_once 'Zend/Mail/MessageTest.php';
  49. require_once 'Zend/Mail/SmtpTest.php';
  50. /**
  51. * @category Zend
  52. * @package Zend_Mail
  53. * @subpackage UnitTests
  54. * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
  55. * @license http://framework.zend.com/license/new-bsd New BSD License
  56. * @group Zend_Mail
  57. */
  58. class Zend_Mail_AllTests
  59. {
  60. public static function main()
  61. {
  62. PHPUnit_TextUI_TestRunner::run(self::suite());
  63. }
  64. public static function suite()
  65. {
  66. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Mail');
  67. $suite->addTestSuite('Zend_Mail_MessageTest');
  68. $suite->addTestSuite('Zend_Mail_InterfaceTest');
  69. $suite->addTestSuite('Zend_Mail_MboxTest');
  70. $suite->addTestSuite('Zend_Mail_MboxMessageOldTest');
  71. $suite->addTestSuite('Zend_Mail_MboxFolderTest');
  72. if (defined('TESTS_ZEND_MAIL_POP3_ENABLED') && constant('TESTS_ZEND_MAIL_POP3_ENABLED') == true) {
  73. $suite->addTestSuite('Zend_Mail_Pop3Test');
  74. }
  75. if (defined('TESTS_ZEND_MAIL_IMAP_ENABLED') && constant('TESTS_ZEND_MAIL_IMAP_ENABLED') == true) {
  76. $suite->addTestSuite('Zend_Mail_ImapTest');
  77. }
  78. if (defined('TESTS_ZEND_MAIL_MAILDIR_ENABLED') && constant('TESTS_ZEND_MAIL_MAILDIR_ENABLED')) {
  79. $suite->addTestSuite('Zend_Mail_MaildirTest');
  80. $suite->addTestSuite('Zend_Mail_MaildirMessageOldTest');
  81. $suite->addTestSuite('Zend_Mail_MaildirFolderTest');
  82. $suite->addTestSuite('Zend_Mail_MaildirWritableTest');
  83. }
  84. if (defined('TESTS_ZEND_MAIL_SMTP_ENABLED') && constant('TESTS_ZEND_MAIL_SMTP_ENABLED') == true) {
  85. $suite->addTestSuite('Zend_Mail_SmtpTest');
  86. }
  87. return $suite;
  88. }
  89. }
  90. if (PHPUnit_MAIN_METHOD == 'Zend_Mail_AllTests::main') {
  91. Zend_Mail_AllTests::main();
  92. }