AllTests.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * XMPPHP: The PHP XMPP Library
  4. * Copyright (C) 2008 Nathanael C. Fritz
  5. * This file is part of SleekXMPP.
  6. *
  7. * XMPPHP is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * XMPPHP is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with XMPPHP; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. * @category xmpphp
  22. * @package XMPPHP
  23. * @author Nathanael C. Fritz <JID: fritzy@netflint.net>
  24. * @author Stephan Wentz <JID: stephan@jabber.wentz.it>
  25. * @author Michael Garvin <JID: gar@netflint.net>
  26. * @copyright 2008 Nathanael C. Fritz
  27. */
  28. // Get current working directory with trailing slash
  29. define('TESTS_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
  30. // Get class directory with trailing slash
  31. define('CLASS_DIR', dirname(TESTS_DIR) . DIRECTORY_SEPARATOR);
  32. /** XMPPHP_LogTest */
  33. require_once TESTS_DIR . 'XMPPHP' . DIRECTORY_SEPARATOR . 'LogTest.php';
  34. /** XMPPHP_XMLObjTest */
  35. require_once TESTS_DIR . 'XMPPHP' . DIRECTORY_SEPARATOR . 'XMLObjTest.php';
  36. /** XMPPHP_XMPPTest */
  37. require_once TESTS_DIR . 'XMPPHP' . DIRECTORY_SEPARATOR . 'XMPPTest.php';
  38. if (!defined('PHPUnit_MAIN_METHOD')) {
  39. define('PHPUnit_MAIN_METHOD', 'AllTests::main');
  40. }
  41. /**
  42. * XMPPHP AllTests
  43. *
  44. * @package XMPPHP
  45. * @author Nathanael C. Fritz <JID: fritzy@netflint.net>
  46. * @author Stephan Wentz <JID: stephan@jabber.wentz.it>
  47. * @author Michael Garvin <JID: gar@netflint.net>
  48. * @copyright 2008 Nathanael C. Fritz
  49. * @version $Id$
  50. */
  51. class AllTests
  52. {
  53. public static function main()
  54. {
  55. PHPUnit_TextUI_TestRunner::run(self::suite());
  56. }
  57. public static function suite()
  58. {
  59. $suite = new PHPUnit_Framework_TestSuite();
  60. $suite->addTestSuite('XMPPHP_LogTest');
  61. $suite->addTestSuite('XMPPHP_XMLObjTest');
  62. $suite->addTestSuite('XMPPHP_XMPPTest');
  63. return $suite;
  64. }
  65. }
  66. if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
  67. AllTests::main();
  68. }