AllTests.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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_Log
  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_Log_AllTests::main');
  24. }
  25. require_once dirname(__FILE__) . '/../../TestHelper.php';
  26. require_once 'Zend/Log/LogTest.php';
  27. require_once 'Zend/Log/Filter/ChainingTest.php';
  28. require_once 'Zend/Log/Filter/PriorityTest.php';
  29. require_once 'Zend/Log/Filter/MessageTest.php';
  30. require_once 'Zend/Log/Filter/SuppressTest.php';
  31. require_once 'Zend/Log/Formatter/SimpleTest.php';
  32. require_once 'Zend/Log/Formatter/XmlTest.php';
  33. require_once 'Zend/Log/Writer/DbTest.php';
  34. if (PHP_OS != 'AIX') {
  35. require_once 'Zend/Log/Writer/FirebugTest.php';
  36. }
  37. require_once 'Zend/Log/Writer/MailTest.php';
  38. require_once 'Zend/Log/Writer/MockTest.php';
  39. require_once 'Zend/Log/Writer/NullTest.php';
  40. require_once 'Zend/Log/Writer/StreamTest.php';
  41. /**
  42. * @category Zend
  43. * @package Zend_Log
  44. * @subpackage UnitTests
  45. * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
  46. * @license http://framework.zend.com/license/new-bsd New BSD License
  47. * @version $Id$
  48. */
  49. class Zend_Log_AllTests
  50. {
  51. public static function main()
  52. {
  53. PHPUnit_TextUI_TestRunner::run(self::suite());
  54. }
  55. public static function suite()
  56. {
  57. // hack to allow us to view code coverage for Log.php
  58. PHPUnit_Util_Filter::removeFileFromFilter(dirname(__FILE__) . '/../../../library/Zend/Log.php', 'PEAR');
  59. $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Log');
  60. $suite->addTestSuite('Zend_Log_LogTest');
  61. $suite->addTestSuite('Zend_Log_Filter_ChainingTest');
  62. $suite->addTestSuite('Zend_Log_Filter_PriorityTest');
  63. $suite->addTestSuite('Zend_Log_Filter_MessageTest');
  64. $suite->addTestSuite('Zend_Log_Filter_SuppressTest');
  65. $suite->addTestSuite('Zend_Log_Formatter_SimpleTest');
  66. $suite->addTestSuite('Zend_Log_Formatter_XmlTest');
  67. $suite->addTestSuite('Zend_Log_Writer_DbTest');
  68. if (PHP_OS != 'AIX') {
  69. $suite->addTestSuite('Zend_Log_Writer_FirebugTest');
  70. }
  71. $suite->addTestSuite('Zend_Log_Writer_MailTest');
  72. $suite->addTestSuite('Zend_Log_Writer_MockTest');
  73. $suite->addTestSuite('Zend_Log_Writer_NullTest');
  74. $suite->addTestSuite('Zend_Log_Writer_StreamTest');
  75. return $suite;
  76. }
  77. }
  78. if (PHPUnit_MAIN_METHOD == 'Zend_Log_AllTests::main') {
  79. Zend_Log_AllTests::main();
  80. }