Source for file tester.php

Documentation is available at tester.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. //
  4. // +----------------------------------------------------------------------+
  5. // | PHP version 4.0 |
  6. // +----------------------------------------------------------------------+
  7. // | Copyright (c) 2002-2004 The PHP Group |
  8. // +----------------------------------------------------------------------+
  9. // | This source file is subject to version 2.02 of the PHP license, |
  10. // | that is bundled with this package in the file LICENSE, and is |
  11. // | available at through the world-wide-web at |
  12. // | http://www.php.net/license/2_02.txt. |
  13. // | If you did not receive a copy of the PHP license and are unable to |
  14. // | obtain it through the world-wide-web, please send a note to |
  15. // | license@php.net so we can mail you a copy immediately. |
  16. // +----------------------------------------------------------------------+
  17. // | Authors: Jeroen Derks <jeroen@derks.it> |
  18. // +----------------------------------------------------------------------+
  19. //
  20. // $Id: tester.php,v 1.6 2004/10/04 19:51:56 jeroend Exp $
  21.  
  22.  
  23.  
  24. /**
  25. * Module test using PHPUnit.
  26. * Module test using PHPUnit.
  27. *
  28. * @package Crypt_Xtea_Test
  29. * @modulegroup Crypt_Xtea_Test
  30. * @module tester
  31. * @access public
  32. *
  33. * @version $Revision: 1.6 $
  34. * @since 2002/Aug/28
  35. * @author Jeroen Derks <jeroen@derks.it>
  36. */
  37.  
  38. // check parameter
  39. if (IsSet($_SERVER['argc']) && 1 < $_SERVER['argc'] && $_SERVER['argv'][1])
  40. {
  41. // check for xdebug presence to enable profiling
  42. if (extension_loaded('xdebug'))
  43. {
  44. xdebug_start_profiling();
  45. $profiling = true;
  46. echo "Profiling enabled.\n";
  47. flush();
  48. }
  49. }
  50.  
  51. /** XteaTest class */
  52. 'XteaTest.php';
  53.  
  54. $suite = new PHPUnit_TestSuite('Crypt_XteaTest');
  55. $result = PHPUnit::run($suite);
  56. echo $result->toString();
  57.  
  58. // check for profiling to show results
  59. if ($profiling)
  60. xdebug_dump_function_profile(XDEBUG_PROFILER_FS_SUM);
  61. else
  62. Crypt_XteaTest::getTimings();
  63. ?>

Documentation generated on Thu, 25 May 2006 15:31:26 +0200 by phpDocumentor 1.3.0RC3