reecriture des adresses dans le bon sens selon le pays
[platal.git] / htdocs / TESTS / index.php
CommitLineData
0337d704 1<?php
2require_once("__init__.php");
3
4require_once('shell_tester.php');
5require_once('mock_objects.php');
6
7class MyReporter extends SimpleReporter {
8 function MyReporter() {
9 HtmlReporter::sendNoCacheHeaders();
10 $this->SimpleReporter();
11 }
12
13 function paintFooter($test_name) {
14 global $tfile;
15 $class = $this->getFailCount() + $this->getExceptionCount() > 0 ? "red" : "green";
16 print "<div class='$class'>";
17 print "<h1><a href='".basename($tfile)."'>$test_name</a> (";
18 print $this->getTestCaseProgress() . "/" . $this->getTestCaseCount();
19 print ")</h1>\n";
20 print "<strong>" . $this->getPassCount() . "</strong> passes | ";
21 print "<strong>" . $this->getFailCount() . "</strong> fails | ";
22 print "<strong>" . $this->getExceptionCount() . "</strong> exceptions.";
23 print "</div>\n";
24 flush();
25 }
26}
27
28echo <<<EOF
29<html>
30 <head>
31 <title>ALL TESTS</title>
32 <style type="text/css">
33 body { padding: 0px; margin: 0px;}
34 div { float: left; color: white; padding: 1ex; border: 1px dashed white; }
35 h1 { padding: 0px; margin: 0px; font-size: 120%; }
36 a , a:visited { color: inherit; }
37 .red { background-color: red; }
38 .green { background-color: green; }
39
40 </style>
41 </head>
42 <body>
43EOF;
44
45foreach (glob(PATH.'/*_*.php') as $tfile) {
46 $reporter = new MyReporter;
47 require_once($tfile);
48}
49
50print "</body>\n</html>\n";
51?>