Added release notes for 'ContentHandler::runLegacyHooks' removal
[mediawiki.git] / tests / parser / MultiTestRecorder.php
blob5fbfecf8c5e39c09e30b362325915ecde3f71d15
1 <?php
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 = [];
10 public function addRecorder( TestRecorder $recorder ) {
11 $this->recorders[] = $recorder;
14 private function proxy( $funcName, $args ) {
15 foreach ( $this->recorders as $recorder ) {
16 call_user_func_array( [ $recorder, $funcName ], $args );
20 public function start() {
21 $this->proxy( __FUNCTION__, func_get_args() );
24 public function startTest( $test ) {
25 $this->proxy( __FUNCTION__, func_get_args() );
28 public function startSuite( $path ) {
29 $this->proxy( __FUNCTION__, func_get_args() );
32 public function endSuite( $path ) {
33 $this->proxy( __FUNCTION__, func_get_args() );
36 public function record( $test, ParserTestResult $result ) {
37 $this->proxy( __FUNCTION__, func_get_args() );
40 public function warning( $message ) {
41 $this->proxy( __FUNCTION__, func_get_args() );
44 public function skipped( $test, $subtest ) {
45 $this->proxy( __FUNCTION__, func_get_args() );
48 public function report() {
49 $this->proxy( __FUNCTION__, func_get_args() );
52 public function end() {
53 $this->proxy( __FUNCTION__, func_get_args() );