AllTests.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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_Session
  17. * @subpackage UnitTests
  18. * @copyright Copyright (c) 2005-2008 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_Session_AllTests::main');
  24. }
  25. /**
  26. * Test helper
  27. */
  28. require_once dirname(__FILE__) . '/../../TestHelper.php';
  29. /**
  30. * Zend_Session tests need to be output buffered because they depend on headers_sent() === false
  31. *
  32. * @see http://framework.zend.com/issues/browse/ZF-700
  33. */
  34. ob_start();
  35. require_once 'SessionTest.php';
  36. /** Zend_Session_SaveHandler_AllTests */
  37. require_once 'Zend/Session/SaveHandler/AllTests.php';
  38. /**
  39. * @category Zend
  40. * @package Zend_Session
  41. * @subpackage UnitTests
  42. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  43. * @license http://framework.zend.com/license/new-bsd New BSD License
  44. */
  45. class Zend_Session_AllTests
  46. {
  47. /**
  48. * Runs this test suite
  49. *
  50. * @return void
  51. */
  52. public static function main()
  53. {
  54. /**
  55. * PHPUnit_TextUI_TestRunner
  56. */
  57. require_once 'PHPUnit/TextUI/TestRunner.php';
  58. PHPUnit_TextUI_TestRunner::run(self::suite());
  59. }
  60. /**
  61. * Creates and returns this test suite
  62. *
  63. * @return PHPUnit_Framework_TestSuite
  64. */
  65. public static function suite()
  66. {
  67. /**
  68. * PHPUnit_Framework_TestSuite
  69. */
  70. require_once 'PHPUnit/Framework/TestSuite.php';
  71. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Session');
  72. $suite->addTestSuite('Zend_SessionTest');
  73. $suite->addTest(Zend_Session_SaveHandler_AllTests::suite());
  74. return $suite;
  75. }
  76. }
  77. if (PHPUnit_MAIN_METHOD == 'Zend_Session_AllTests::main') {
  78. Zend_Session_AllTests::main();
  79. }