Ejemplo n.º 1
0
 static function equals($value1, $value2, $message = '')
 {
     if ($value1 != $value2) {
         if ($message == '') {
             $message = "Assertion failed: '{$value1}' != '{$value2}'";
         }
         trigger_error($message, E_USER_WARNING);
     } else {
         TestRunnerFactory::get()->on_test_success();
     }
 }
Ejemplo n.º 2
0
    }
    
    a:visited {
    	color: rgb(0%, 0%, 80%);
    }
    </style>
  </head>
  
  <body>
    <h1>PHP Unit Tester<?php 
echo $title;
?>
</h1>
<?php 
if ($dirValid) {
    TestRunnerFactory::get($directory, HtmlWriter)->testMain();
} else {
    ?>
  <h2>Set the Test Directory</h2>
  <form>
    <b>Directory</b>: <input type=text name="directory" value="<?php 
    echo $directory;
    ?>
" 
    size=30> <input type=submit value="Run Tests">
  </form>
  <p>
    <b>Tip</b>: After setting the correct directory and clicking <b>Run Tests</b>, save 
    a bookmark to the resulting page. Opening that bookmark will immediately re-run all
	tests.
  </p>