return $return;
}
+if (!extension_loaded("xdebug")) {
+ echo "<p>Xdebug has to be enabled.</p>\n";
+}
+
if ($_GET["start"]) {
$_SESSION["coverage"] = array();
header("Location: .");
exit;
-} elseif ($_GET["filename"]) {
+}
+if ($_GET["filename"]) {
$filename = basename($_GET["filename"]);
$coverage = $_SESSION["coverage"][realpath($filename)];
$file = explode("<br />", highlight_file($filename, true));
}
$s .= "$line<br />\n";
}
-} elseif (isset($_SESSION["coverage"])) {
- echo "<ul>\n";
+} else {
+ echo "<table border='0' cellspacing='0' cellpadding='1'>\n";
foreach (glob("*.php") as $filename) {
if ($filename{0} != "_") {
$coverage = $_SESSION["coverage"][realpath($filename)];
- echo "<li><a href='_coverage.php?filename=$filename'>$filename</a> (" . (isset($coverage) ? "tested" : "untested") . ")</li>\n";
+ echo "<tr><td align='right' style='background-color: ";
+ if (isset($coverage)) {
+ $values = array_count_values($coverage);
+ $ratio = $values[-1] / count($coverage);
+ echo ($ratio ? "Silver" : "#C0FFC0") . ";'>" . round(100 - 100 * $ratio);
+ } else {
+ echo "#FFC0C0;'>0";
+ }
+ echo "%</td><td><a href='_coverage.php?filename=$filename'>$filename</a></td></tr>\n";
}
}
- echo "</ul>\n";
+ echo "</table>\n";
+ echo "<p><a href='_coverage.php?start=1'>Start new coverage</a> (requires <a href='http://www.xdebug.org'>Xdebug</a>)</p>\n";
}
-?>
-<p><a href="_coverage.php?start=1">Start new coverage</a> (requires <a href="http://www.xdebug.org">Xdebug</a>)</p>
<td>//input[@name='grants[0][SHOW VIEW]']</td>
<td></td>
</tr>
-<tr>
- <td>click</td>
- <td>grants[0][TRIGGER]</td>
- <td></td>
-</tr>
<tr>
<td>click</td>
<td>grants[0][UPDATE]</td>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="" />
-<title>Coverage</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">Coverage</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/phpMinAdmin/_coverage.php</td>
- <td></td>
-</tr>
-
-</tbody></table>
-</body>
-</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Logout</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Logout</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/phpMinAdmin/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>logout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Logout successful.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/phpMinAdmin/_coverage.php</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
<tr><td><a href="16-processlist.html">Process list</a></td></tr>
<tr><td><a href="17-export.html">Export</a></td></tr>
<tr><td><a href="18-events.html">Events</a></td></tr>
+<tr><td><a href="logout.html">Logout</a></td></tr>
</tbody></table>
</body>
</html>