Docblock update
[htmlpurifier.git] / tests / PHPT / Reporter / SimpleTest.php
blob34b47cd49244343093e1689e3095c57d472fde0f
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)
15 $this->reporter = $reporter;
18 // TODO: Figure out what the proper calls should be, since we've given
19 // each Suite its own UnitTestCase controller
21 /**
22 * Called when the Reporter is started from a PHPT_Suite
23 * @todo Figure out if Suites can be named
25 public function onSuiteStart(PHPT_Suite $suite)
27 //$this->reporter->paintGroupStart('PHPT Suite', $suite->count());
30 /**
31 * Called when the Reporter is finished in a PHPT_Suite
33 public function onSuiteEnd(PHPT_Suite $suite)
35 //$this->reporter->paintGroupEnd('PHPT Suite');
38 /**
39 * Called when a Case is started
41 public function onCaseStart(PHPT_Case $case)
43 //$this->reporter->paintCaseStart($case->name);
46 /**
47 * Called when a Case ends
49 public function onCaseEnd(PHPT_Case $case)
51 //$this->reporter->paintCaseEnd($case->name);
54 /**
55 * Called when a Case runs without Exception
57 public function onCasePass(PHPT_Case $case)
59 $this->reporter->paintPass("{$case->name} in {$case->filename}");
62 /**
63 * Called when a PHPT_Case_VetoException is thrown during a Case's run()
65 public function onCaseSkip(PHPT_Case $case, PHPT_Case_VetoException $veto)
67 $this->reporter->paintSkip($veto->getMessage() . ' [' . $case->filename .']');
70 /**
71 * Called when any Exception other than a PHPT_Case_VetoException is encountered
72 * during a Case's run()
74 public function onCaseFail(PHPT_Case $case, PHPT_Case_FailureException $failure)
76 $this->reporter->paintFail($failure->getReason());
79 public function onParserError(Exception $exception)
81 $this->reporter->paintException($exception);
86 // vim: et sw=4 sts=4