AllTests.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 ZendX
  16. * @package UnitTests
  17. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. */
  21. if (!defined('PHPUnit_MAIN_METHOD')) {
  22. define('PHPUnit_MAIN_METHOD', 'AllTests::main');
  23. }
  24. /**
  25. * @see ZendX_AllTests
  26. */
  27. require_once 'ZendX/AllTests.php';
  28. class AllTests
  29. {
  30. public static function main()
  31. {
  32. $parameters = array();
  33. if (TESTS_GENERATE_REPORT && extension_loaded('xdebug')) {
  34. $parameters['reportDirectory'] = TESTS_GENERATE_REPORT_TARGET;
  35. }
  36. if (defined('TESTS_ZEND_LOCALE_FORMAT_SETLOCALE') && TESTS_ZEND_LOCALE_FORMAT_SETLOCALE) {
  37. // run all tests in a special locale
  38. setlocale(LC_ALL, TESTS_ZEND_LOCALE_FORMAT_SETLOCALE);
  39. }
  40. PHPUnit_TextUI_TestRunner::run(self::suite(), $parameters);
  41. }
  42. public static function suite()
  43. {
  44. $suite = new PHPUnit_Framework_TestSuite('Zend Framework Extras');
  45. $suite->addTest(ZendX_AllTests::suite());
  46. return $suite;
  47. }
  48. }
  49. if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
  50. AllTests::main();
  51. }