2
0

AllTests.php 2.7 KB

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