standardize EOLs to output diffs properly on Windows
[phpt.git] / src / PHPT / Reporter.php
blob2d007cf4a0a1992e9a772ecb5c06036e26883fb3
1 <?php
3 interface PHPT_Reporter
5 /**
6 * Called when the Reporter is started from a PHPT_Suite
8 * Use this method to display any start specific messages, such as number of tests
9 * to run, etc.
11 * @param PHPT_Suite $suite
12 * @return string
14 public function onSuiteStart(PHPT_Suite $suite);
16 /**
17 * Called when the Reporter is finished in a PHPT_Suite
19 * Use this method to display any end specific messages such as pass/fail/skip tallies,
20 * time run, etc.
22 * @param PHPT_Suite $suite
23 * @return string
25 public function onSuiteEnd(PHPT_Suite $suite);
27 /**
28 * Called when a Case is started
30 * @param PHPT_Case $case
31 * @return string
33 public function onCaseStart(PHPT_Case $case);
35 /**
36 * Called when a Case ends
38 * @param PHPT_Case $case
39 * @return string
41 public function onCaseEnd(PHPT_Case $case);
43 /**
44 * Called when a Case runs without Exception
46 * @param PHPT_Case $case
47 * @return string
49 public function onCasePass(PHPT_Case $case);
51 /**
52 * Called when a PHPT_Case_VetoException is thrown during a Case's run()
54 * @param PHPT_Case $case
55 * @param PHPT_Case_VetoException $veto
56 * @return string
58 public function onCaseSkip(PHPT_Case $case, PHPT_Case_VetoException $veto);
60 /**
61 * Called when any Exception other than a PHPT_Case_VetoException is encountered
62 * during a Case's run()
64 * @param PHPT_Case $case
65 * @param PHPT_Case_FailureException $failure
66 * @return string
68 public function onCaseFail(PHPT_Case $case, PHPT_Case_FailureException $failure);
70 public function onParserError(Exception $exception);