Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4152345
MultiTestRecorder.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MultiTestRecorder.php
View Options
<?php
use
Wikimedia\Parsoid\ParserTests\Test
as
ParserTest
;
use
Wikimedia\Parsoid\ParserTests\TestMode
as
ParserTestMode
;
/**
* This is a TestRecorder representing a collection of other TestRecorders.
* It proxies calls to all constituent objects.
*/
class
MultiTestRecorder
extends
TestRecorder
{
/** @var TestRecorder[] */
private
$recorders
=
[];
public
function
addRecorder
(
TestRecorder
$recorder
)
{
$this
->
recorders
[]
=
$recorder
;
}
private
function
proxy
(
string
$funcName
,
array
$args
)
{
foreach
(
$this
->
recorders
as
$recorder
)
{
$recorder
->
$funcName
(
...
$args
);
}
}
public
function
start
()
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
startTest
(
ParserTest
$test
,
ParserTestMode
$mode
)
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
startSuite
(
string
$path
)
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
endSuite
(
string
$path
)
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
record
(
ParserTestResult
$result
)
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
warning
(
string
$message
)
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
skipped
(
ParserTest
$test
,
ParserTestMode
$mode
,
string
$reason
)
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
report
()
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
public
function
end
()
{
$this
->
proxy
(
__FUNCTION__
,
func_get_args
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 20:18 (7 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b1/4e/2d088c9bdf45c38e737050f8b9c5
Default Alt Text
MultiTestRecorder.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment