More support for white-space.
[htmlpurifier.git] / tests / PHPT / Reporter / SimpleTest.php
blob25ffe7b4c00b5e92c3b5069bf223af42fb9692fe
1 <?php
3 /**
4 * Proxies results from PHPT_Reporter to SimpleTest's reporter
5 */
6 class PHPT_Reporter_SimpleTest implements PHPT_Reporter
9 /** SimpleTest reporter to proxy results to */
10 protected $reporter;
12 /** @param SimpleTest reporter */
13 public function __construct($reporter) {
14 $this->reporter = $reporter;
17 // TODO: Figure out what the proper calls should be, since we've given
18 // each Suite its own UnitTestCase controller
20 /**
21 * Called when the Reporter is started from a PHPT_Suite
22 * @todo Figure out if Suites can be named
24 public function onSuiteStart(PHPT_Suite $suite) {
25 //$this->reporter->paintGroupStart('PHPT Suite', $suite->count());
28 /**
29 * Called when the Reporter is finished in a PHPT_Suite
31 public function onSuiteEnd(PHPT_Suite $suite) {
32 //$this->reporter->paintGroupEnd('PHPT Suite');
35 /**
36 * Called when a Case is started
38 public function onCaseStart(PHPT_Case $case) {
39 //$this->reporter->paintCaseStart($case->name);
42 /**
43 * Called when a Case ends
45 public function onCaseEnd(PHPT_Case $case) {
46 //$this->reporter->paintCaseEnd($case->name);
49 /**
50 * Called when a Case runs without Exception
52 public function onCasePass(PHPT_Case $case) {
53 $this->reporter->paintPass("{$case->name} in {$case->filename}");
56 /**
57 * Called when a PHPT_Case_VetoException is thrown during a Case's run()
59 public function onCaseSkip(PHPT_Case $case, PHPT_Case_VetoException $veto) {
60 $this->reporter->paintSkip($veto->getMessage() . ' [' . $case->filename .']');
63 /**
64 * Called when any Exception other than a PHPT_Case_VetoException is encountered
65 * during a Case's run()
67 public function onCaseFail(PHPT_Case $case, PHPT_Case_FailureException $failure) {
68 $this->reporter->paintFail($failure->getReason());
71 public function onParserError(Exception $exception) {
72 $this->reporter->paintException($exception);
77 // vim: et sw=4 sts=4