phpci/PHPCI/View/Build/errors.phtml
Pablo Tejada 11f087a239 Implementation of an alternative PHPUnit plugin:
- Reformat the error output.
- Display collapsed trace in the Information tab widget.
- Handle incomplete tests in the results.
- Unit tests for all new classes.
- Display raw phpunit output.
2016-10-10 10:46:04 -04:00

38 lines
1.2 KiB
PHTML

<?php
use PHPCI\Helper\Lang;
$linkTemplate = $build->getFileLinkTemplate();
/** @var \PHPCI\Model\BuildError[] $errors */
foreach ($errors as $error):
$link = str_replace('{FILE}', $error->getFile(), $linkTemplate);
$link = str_replace('{LINE}', $error->getLineStart(), $link);
$link = str_replace('{LINE_END}', $error->getLineEnd(), $link);
?>
<tr class="bg-<?php print $error->getSeverityClass(); ?>">
<td>
<span class="label label-<?php print $error->getSeverityClass(); ?>">
<?php print Lang::get($error->getSeverityString()); ?>
</span>
</td>
<td><?php print Lang::get($error->getPlugin()); ?></td>
<td><a href="<?php print $link; ?>" target="_blank"><?php print $error->getFile(); ?></a></td>
<td>
<a href="<?php print $link; ?>" target="_blank">
<?php
if ($error->getLineStart() == $error->getLineEnd() || !$error->getLineEnd()) {
print $error->getLineStart();
} else {
print $error->getLineStart() . ' - ' . $error->getLineEnd();
}
?>
</a>
</td>
<td class="visible-line-breaks"><?php print $error->getMessage(); ?></td>
</tr>
<?php endforeach; ?>