Changeset 1423

Show
Ignore:
Timestamp:
04/08/06 19:01:00 (3 years ago)
Author:
sdcosta
Message:

Now we can test the tests.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/magpie-hacks/MagpieTests/runTests.php

    r1422 r1423  
    2222require_once('rss_unitTest.inc'); 
    2323 
    24 $thisScriptBaseUrl = 'http://'.$_SERVER['HTTP_HOST']  
    25     .preg_replace('#(.+)/.*\?.*$#','$1',$_SERVER['REQUEST_URI']) ."/"; 
     24 
     25$thisScriptBaseUrl = "http://" . $_SERVER['HTTP_HOST']  
     26    . preg_replace('#(.+)/.*$#','$1',$_SERVER['PHP_SELF']) ."/";  
    2627define( '_FETCH_TEST_URL', $thisScriptBaseUrl . "fetchTest.php" ); 
    2728 
     
    3637    } else { 
    3738        $rss = @fetch_rss(_FETCH_TEST_URL . "?testfile=" . $test); 
    38         $result = assert($_magpie_unitTest->getExpect()); 
     39        $result = @assert($_magpie_unitTest->getExpect()); 
    3940    } 
    4041    return $result; 
     
    8384           echo "<td>\n";  
    8485           if ($result){ 
    85             echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?testfile=" . $testNameSansExt . "\">" ; 
     86            echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?testfile=" . urlencode($testNameSansExt) . "\">" ; 
    8687            echo "<font color=\"green\">Test Passed</font>"; 
    8788            echo "</a>"; 
    8889           }else{ 
    89             echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?testfile=" . $testNameSansExt . "\">" ; 
     90            echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?testfile=" . urlencode($testNameSansExt) . "\">" ; 
    9091            echo "<font color=\"red\">Test Failed</font>"; 
    9192            echo "</a>";