Source for file testdox.php

Documentation is available at testdox.php

  1. <?php
  2. /**
  3.  *    Extension for a TestDox reporter
  4.  *    @package    SimpleTest
  5.  *    @subpackage    Extensions
  6.  *    @version    $Id: testdox.php 2004 2010-10-31 13:44:14Z jsweat $
  7.  */
  8.  
  9. /**
  10.  *     TestDox reporter
  11.  *    @package    SimpleTest
  12.  *    @subpackage    Extensions
  13.  */
  14. {
  15.     var $_test_case_pattern = '/^TestOf(.*)$/';
  16.  
  17.     function __construct($test_case_pattern '/^TestOf(.*)$/'{
  18.         parent::__construct();
  19.         $this->_test_case_pattern = empty($test_case_pattern'/^(.*)$/' $test_case_pattern;
  20.     }
  21.  
  22.     function paintCaseStart($test_name{
  23.         preg_match($this->_test_case_pattern$test_name$matches);
  24.         if (!empty($matches[1])) {
  25.             echo $matches[1"\n";
  26.         else {
  27.             echo $test_name "\n";
  28.         }
  29.     }
  30.  
  31.     function paintCaseEnd($test_name{
  32.         echo "\n";
  33.     }
  34.  
  35.     function paintMethodStart($test_name{
  36.         if (!preg_match('/^test(.*)$/i'$test_name$matches)) {
  37.             return;
  38.         }
  39.         $test_name $matches[1];
  40.         $test_name preg_replace('/([A-Z])([A-Z])/''$1 $2'$test_name);
  41.         echo '- ' strtolower(preg_replace('/([a-zA-Z])([A-Z0-9])/''$1 $2'$test_name));
  42.     }
  43.  
  44.     function paintMethodEnd($test_name{
  45.         echo "\n";
  46.     }
  47.  
  48.     function paintFail($message{
  49.         echo " [FAILED]";
  50.     }
  51. }
  52. ?>

Documentation generated on Sun, 31 Oct 2010 16:32:41 -0500 by phpDocumentor 1.4.3