gallery: Fix phan annotation for ImageGalleryBase::getImages
[mediawiki.git] / tests / parser / MultiTestRecorder.php
blob64ec7f0a461f13765867ab489396a93ffeec158c
1 <?php
3 use Wikimedia\Parsoid\ParserTests\Test as ParserTest;
4 use Wikimedia\Parsoid\ParserTests\TestMode as ParserTestMode;
6 /**
7 * This is a TestRecorder representing a collection of other TestRecorders.
8 * It proxies calls to all constituent objects.
9 */
10 class MultiTestRecorder extends TestRecorder {
11 /** @var TestRecorder[] */
12 private $recorders = [];
14 public function addRecorder( TestRecorder $recorder ) {
15 $this->recorders[] = $recorder;
18 private function proxy( $funcName, $args ) {
19 foreach ( $this->recorders as $recorder ) {
20 $recorder->$funcName( ...$args );
24 public function start() {
25 $this->proxy( __FUNCTION__, func_get_args() );
28 public function startTest( ParserTest $test, ParserTestMode $mode ) {
29 $this->proxy( __FUNCTION__, func_get_args() );
32 public function startSuite( string $path ) {
33 $this->proxy( __FUNCTION__, func_get_args() );
36 public function endSuite( string $path ) {
37 $this->proxy( __FUNCTION__, func_get_args() );
40 public function record( ParserTestResult $result ) {
41 $this->proxy( __FUNCTION__, func_get_args() );
44 public function warning( string $message ) {
45 $this->proxy( __FUNCTION__, func_get_args() );
48 public function skipped( ParserTest $test, ParserTestMode $mode, string $reason ) {
49 $this->proxy( __FUNCTION__, func_get_args() );
52 public function report() {
53 $this->proxy( __FUNCTION__, func_get_args() );
56 public function end() {
57 $this->proxy( __FUNCTION__, func_get_args() );