AllTests.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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_Service_Amazon
  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(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
  23. if (!defined('PHPUnit_MAIN_METHOD')) {
  24. define('PHPUnit_MAIN_METHOD', 'Zend_Service_Amazon_AllTests::main');
  25. }
  26. require_once 'Zend/Service/Amazon/OfflineTest.php';
  27. require_once 'Zend/Service/Amazon/OnlineTest.php';
  28. require_once 'Zend/Service/Amazon/Ec2/AllTests.php';
  29. require_once 'Zend/Service/Amazon/S3/AllTests.php';
  30. require_once 'Zend/Service/Amazon/Sqs/AllTests.php';
  31. /**
  32. * @category Zend
  33. * @package Zend_Service_Amazon
  34. * @subpackage UnitTests
  35. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  36. * @license http://framework.zend.com/license/new-bsd New BSD License
  37. * @group Zend_Service
  38. * @group Zend_Service_Amazon
  39. */
  40. class Zend_Service_Amazon_AllTests
  41. {
  42. /**
  43. * Runs this test suite
  44. *
  45. * @return void
  46. */
  47. public static function main()
  48. {
  49. PHPUnit_TextUI_TestRunner::run(self::suite());
  50. }
  51. /**
  52. * Creates and returns this test suite
  53. *
  54. * @return PHPUnit_Framework_TestSuite
  55. */
  56. public static function suite()
  57. {
  58. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_Amazon');
  59. $suite->addTestSuite('Zend_Service_Amazon_OfflineTest');
  60. if (defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED') &&
  61. constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED') &&
  62. defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID')) {
  63. $suite->addTestSuite('Zend_Service_Amazon_OnlineTest');
  64. } else {
  65. $suite->addTestSuite('Zend_Service_Amazon_OnlineTest_Skip');
  66. }
  67. $suite->addTest(Zend_Service_Amazon_Ec2_AllTests::suite());
  68. $suite->addTest(Zend_Service_Amazon_S3_AllTests::suite());
  69. $suite->addTest(Zend_Service_Amazon_Sqs_AllTests::suite());
  70. return $suite;
  71. }
  72. }
  73. if (PHPUnit_MAIN_METHOD == 'Zend_Service_Amazon_AllTests::main') {
  74. Zend_Service_Amazon_AllTests::main();
  75. }