private function writeHtml(bool $allSucceeded)
{
header('Content-Type: text/html; charset=utf-8');
echo '<head>' . "\n";
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />' . "\n";
echo '<title>Beholder for project ' . $this->project . '</title>' . "\n";
echo '<style>' . "\n";
echo ' body {font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif;}' . "\n";
echo ' table {font-size: small; border-collapse: collapse;}' . "\n";
echo ' table th {border: 1px solid #000; background: #000; color: #fff;}' . "\n";
echo ' table td {border: 1px solid #000; padding: .25em .5em;}' . "\n";
echo '</style>' . "\n";
echo '</head>' . "\n";
echo '<body style="background-color: ' . ($allSucceeded ? '#ccffcc' : '#ffcccc') . '; width: 90%; height: 100%; padding: 1em; margin: 0;">' . "\n";
echo '<h1>Beholder for project ' . $this->project . "</h1>\n";
echo '<p>Tests included: ' . $this->includeFilter . "\n";
echo '<br>Tests excluded: ' . $this->excludeFilter . "\n";
echo '</p>' . "\n";
echo '<table><tr><th>Run order</th><th>Duration</th><th>Ident</th><th>Status</th><th>Test name</th><th>Comment</th></tr>' . "\n";
foreach ($this->testsData as $data) {
echo sprintf('
<tr>
<td>%d</td>
<td>%.2fs</td>
<td>%s</td>
<td style="color: %s;">%s</td>
<td><b>%s</b></td>
<td><i>%s</i></td>
</tr>' . "\n", $data['order'], $data['duration'], $data['ident'], $data['result']->isSuccess() ? 'green' : 'red; font-weight: bold;', $data['result']->getStatusMessage(), $data['test']->getDescription(), $data['result']->getDescription());
}
echo '</table>
<h2>Parameters</h2>
<dl>
<dt>' . self::PARAM_INCLUDE . '</dt>
<dd>Tests to include, list of shell patterns separated by comma, default *</dd>
<dt>' . self::PARAM_EXCLUDE . '</dt>
<dd>Tests to exclude, empty by default</dd>
<dt>' . self::PARAM_OUTPUT . '</dt>
<dd>' . self::OUTPUT_HTML . ' = HTML output, ' . self::OUTPUT_TEXT . ' = text output</dd>
</dl>
<p>Tests are included, then excluded.</p>
<p><a href="?' . self::PARAM_INCLUDE . '=' . $this->includeFilter . '&' . self::PARAM_EXCLUDE . '=' . $this->excludeFilter . '&' . self::PARAM_OUTPUT . '=' . self::OUTPUT_TEXT . '">Text version</a></p>
</body>' . "\n";
}