MediaWiki REL1_31
MultiTestRecorder.php
Go to the documentation of this file.
1<?php
2
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}
if( $line===false) $args
Definition cdb.php:64
This is a TestRecorder representing a collection of other TestRecorders.
skipped( $test, $subtest)
Mark a test skipped.
warning( $message)
Show a warning to the user.
report()
Called before finishing the test run.
startTest( $test)
Called before starting a test.
addRecorder(TestRecorder $recorder)
proxy( $funcName, $args)
end()
Called at the end of the parser test run.
endSuite( $path)
Called after ending an input file.
start()
Called at beginning of the parser test run.
record( $test, ParserTestResult $result)
Called after each test.
startSuite( $path)
Called before starting an input file.
Represent the result of a parser test.
Interface to record parser test results.