home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / testchoose.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  1.0 KB  |  44 lines

  1. <?php
  2.  
  3. // BC hack to define PATH_SEPARATOR for version of PHP prior 4.3
  4. if(!defined('PATH_SEPARATOR')) {
  5.     if(defined('DIRECTORY_SEPARATOR') && DIRECTORY_SEPARATOR == "\\") {
  6.         define('PATH_SEPARATOR', ';');
  7.     } else {
  8.         define('PATH_SEPARATOR', ':');
  9.     }
  10. }
  11. ini_set('include_path', '..'.PATH_SEPARATOR.ini_get('include_path'));
  12.  
  13. require_once('PHPUnit.php');
  14. require_once('test_setup.php');
  15. require_once('testUtils.php');
  16.  
  17. $output = '';
  18. foreach ($testcases as $testcase) {
  19.     include_once($testcase.'.php');
  20.     $output .= "<div class=\"testlineup\">\n";
  21.     $output .= "<h1>TestCase : $testcase</h1>\n";
  22.     $testmethods[$testcase] = getTests($testcase);
  23.     foreach ($testmethods[$testcase] as $method) {
  24.         $output .= testCheck($testcase, $method);
  25.     }
  26.     $output .= "</div>\n";
  27. }
  28.  
  29. ?>
  30. <html>
  31. <head>
  32. <title>MDB Tests</title>
  33. <link href="tests.css" rel="stylesheet" type="text/css">
  34. </head>
  35. <body>
  36.  
  37. <form method="post" action="test.php">
  38. <?php
  39. echo($output);
  40. ?>
  41. <input type="submit">
  42. </form>
  43. </body>
  44. </html>