report.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Laravel - Test Report</title>
  6. <link href='http://fonts.googleapis.com/css?family=Ubuntu&amp;subset=latin' rel='stylesheet' type='text/css'>
  7. <style type="text/css">
  8. body {
  9. background-color: #fff;
  10. font-family: 'Ubuntu', sans-serif;
  11. font-size: 18px;
  12. color: #3f3f3f;
  13. padding: 10px;
  14. }
  15. h1 {
  16. font-size: 35px;
  17. color: #6d6d6d;
  18. margin: 0 0 10px 0;
  19. text-shadow: 1px 1px #000;
  20. }
  21. h2 {
  22. font-size: 25px;
  23. color: #6d6d6d;
  24. text-shadow: 1px 1px #000;
  25. }
  26. h3 {
  27. font-size: 20px;
  28. color: #6d6d6d;
  29. text-shadow: 1px 1px #000;
  30. }
  31. #wrapper {
  32. width: 100%;
  33. }
  34. div.content {
  35. padding: 10px 10px 10px 10px;
  36. background-color: #eee;
  37. border-radius: 10px;
  38. margin-bottom: 10px;
  39. }
  40. div.basic {
  41. background-color: #eee;
  42. }
  43. div.passed {
  44. background-color: #d8f5cf;
  45. }
  46. div.failed {
  47. background-color: #ffebe8;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <div id="wrapper">
  53. <h1>Test Report</h1>
  54. <h2>Passed <?php echo $passed; ?> / <?php echo $total; ?> Tests</h2>
  55. <?php foreach ($results as $suite => $results): ?>
  56. <h3><?php echo $suite; ?></h3>
  57. <?php foreach ($results as $result): ?>
  58. <div class="content <?php echo ($result['result']) ? 'passed' : 'failed'; ?>">
  59. <strong><?php echo ($result['result']) ? 'Passed' : 'Failed'; ?>:</strong> <?php echo $result['name']; ?>
  60. </div>
  61. <?php endforeach; ?>
  62. <?php endforeach; ?>
  63. </div>
  64. </body>
  65. </html>