stats.html.php 1.2 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. $passes = intval($count['passes']) ?: 0;
  3. $asserts = intval($count['asserts']) ?: 0;
  4. $fails = intval($count['fails']) ?: 0;
  5. $exceptions = intval($count['exceptions']) ?: 0;
  6. ?>
  7. <div class="test-result test-result-<?php echo ($success ? 'success' : 'fail') ?>">
  8. <span class="digit"><?php echo $passes; ?></span> /
  9. <span class="digit"><?php echo $asserts; ?></span> <?php echo $fails == 1 ? 'pass': 'passes'; ?>,
  10. <span class="digit"><?php echo $fails; ?></span> <?php echo $fails == 1 ? 'fail' : 'fails'; ?>
  11. and <span class="digit"><?php echo $exceptions ?></span> <?php echo $exceptions == 1 ? ' exception' : ' exceptions'; ?>
  12. </div>
  13. <?php foreach ((array) $stats['errors'] as $error): ?>
  14. <?php if ($error['result'] == 'fail' || $error['result'] == 'exception'): ?>
  15. <?php echo $self->render("{$error['result']}", compact('error')); ?>
  16. <?php endif ?>
  17. <?php endforeach ?>
  18. <?php foreach ((array) $stats['skips'] as $skip): ?>
  19. <?php $trace = $skip['trace'][1]; ?>
  20. <div class="test-skip">
  21. <?php $method = $trace['function']; ?>
  22. <?php $test = $trace['class'] . ($method != 'skip' ? "::{$method}()" : ''); ?>
  23. Skipped test <?php echo $test ?>
  24. <span class="content"><?php echo $skip['message'] ?></span>
  25. </div>
  26. <?php endforeach ?>