SECURITY: blacklist CSS var()
[lhc/web/wiklou.git] / tests / parser / MultiTestRecorder.php
1 <?php
2
3 /**
4 * This is a TestRecorder representing a collection of other TestRecorders.
5 * It proxies calls to all constituent objects.
6 */
7 class MultiTestRecorder extends TestRecorder {
8 private $recorders = [];
9
10 public function addRecorder( TestRecorder $recorder ) {
11 $this->recorders[] = $recorder;
12 }
13
14 private function proxy( $funcName, $args ) {
15 foreach ( $this->recorders as $recorder ) {
16 call_user_func_array( [ $recorder, $funcName ], $args );
17 }
18 }
19
20 public function start() {
21 $this->proxy( __FUNCTION__, func_get_args() );
22 }
23
24 public function startTest( $test ) {
25 $this->proxy( __FUNCTION__, func_get_args() );
26 }
27
28 public function startSuite( $path ) {
29 $this->proxy( __FUNCTION__, func_get_args() );
30 }
31
32 public function endSuite( $path ) {
33 $this->proxy( __FUNCTION__, func_get_args() );
34 }
35
36 public function record( $test, ParserTestResult $result ) {
37 $this->proxy( __FUNCTION__, func_get_args() );
38 }
39
40 public function warning( $message ) {
41 $this->proxy( __FUNCTION__, func_get_args() );
42 }
43
44 public function skipped( $test, $subtest ) {
45 $this->proxy( __FUNCTION__, func_get_args() );
46 }
47
48 public function report() {
49 $this->proxy( __FUNCTION__, func_get_args() );
50 }
51
52 public function end() {
53 $this->proxy( __FUNCTION__, func_get_args() );
54 }
55 }