Reporter.php 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * Interface for sending output to the client.
  4. * @package Sweety
  5. * @author Chris Corbyn
  6. */
  7. interface Sweety_Reporter
  8. {
  9. /**
  10. * Get the reporter used to report on this specific test case.
  11. * @param string $testCase
  12. * @return Sweety_Reporter
  13. */
  14. public function getReporterFor($testCase);
  15. /**
  16. * Returns true if start() has been invoked.
  17. * @return boolean
  18. */
  19. public function isStarted();
  20. /**
  21. * Start reporting.
  22. */
  23. public function start();
  24. /**
  25. * Report a skipped test case.
  26. * @param string $message
  27. * @param string $path
  28. */
  29. public function reportSkip($message, $path);
  30. /**
  31. * Report a passing assertion.
  32. * @param string $message
  33. * @param string $path
  34. */
  35. public function reportPass($message, $path);
  36. /**
  37. * Report a failing assertion.
  38. * @param string $message
  39. * @param string $path
  40. */
  41. public function reportFail($message, $path);
  42. /**
  43. * Report an unexpected exception.
  44. * @param string $message
  45. * @param string $path
  46. */
  47. public function reportException($message, $path);
  48. /**
  49. * Report output from something like a dump().
  50. * @param string $output
  51. * @param string $path
  52. */
  53. public function reportOutput($output, $path);
  54. /**
  55. * End reporting.
  56. */
  57. public function finish();
  58. }