Source for file testdox.php

Documentation is available at testdox.php

  1. <?php
  2.  
  3. {
  4.     var $_test_case_pattern = '/^TestOf(.*)$/';
  5.  
  6.     function TestDoxReporter($test_case_pattern '/^TestOf(.*)$/'{
  7.         parent::SimpleScorer();
  8.         $this->_test_case_pattern = empty($test_case_pattern'/^(.*)$/' $test_case_pattern;
  9.     }
  10.  
  11.     function paintCaseStart($test_name{
  12.         preg_match($this->_test_case_pattern$test_name$matches);
  13.         if (!empty($matches[1])) {
  14.             echo $matches[1"\n";
  15.         else {
  16.             echo $test_name "\n";
  17.         }
  18.     }
  19.  
  20.     function paintCaseEnd({
  21.         echo "\n";
  22.     }
  23.  
  24.     function paintMethodStart($test_name{
  25.         if (!preg_match('/^test(.*)$/i'$test_name$matches)) {
  26.             return;
  27.         }
  28.         $test_name $matches[1];
  29.  
  30.         $test_name preg_replace('/([A-Z])([A-Z])/''$1 $2'$test_name);
  31.         echo '- ' strtolower(preg_replace('/([a-zA-Z])([A-Z0-9])/''$1 $2'$test_name));
  32.     }
  33.  
  34.     function paintMethodEnd({
  35.         echo "\n";
  36.     }
  37.  
  38.     function paintFail({
  39.         echo " [FAILED]";
  40.     }
  41. }

Documentation generated on Sun, 04 May 2008 09:22:17 -0500 by phpDocumentor 1.3.0