result.txt.php 491 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. if ($success && $count['skips']) {
  3. echo "{:green}OK, but skipped tests.{:end}\n";
  4. } elseif ($success) {
  5. echo "{:green}OK{:end}\n";
  6. } else {
  7. echo "{:red}FAIL{:end}\n";
  8. }
  9. echo "\n";
  10. printf(
  11. "%d / %d %s\n",
  12. $count['passes'],
  13. $count['asserts'],
  14. $count['passes'] == 1 ? 'pass' : 'passes'
  15. );
  16. printf(
  17. '%d %s',
  18. $count['fails'],
  19. $count['fails'] == 1 ? 'fail' : 'fails'
  20. );
  21. printf(
  22. " and %d %s\n",
  23. $count['exceptions'],
  24. $count['exceptions'] == 1 ? 'exception' : 'exceptions'
  25. );
  26. ?>