Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4075521
ParserTestResult.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
ParserTestResult.php
View Options
<?php
/**
* @file
*
* @copyright Copyright © 2013, Antoine Musso
* @copyright Copyright © 2013, Wikimedia Foundation Inc.
*/
use
Wikimedia\Parsoid\ParserTests\Test
as
ParserTest
;
use
Wikimedia\Parsoid\ParserTests\TestMode
as
ParserTestMode
;
/**
* Represent the result of a parser test.
*
* @since 1.22
*/
class
ParserTestResult
{
/** @var ParserTest The test info */
public
$test
;
/** @var ParserTestMode The test mode */
public
$mode
;
/** @var string Text that was expected */
public
$expected
;
/** @var string Actual text rendered */
public
$actual
;
/**
* @param ParserTest $test The test info class
* @param ParserTestMode $mode The test mode
* @param string $expected The normalized expected output
* @param string $actual The actual output
*/
public
function
__construct
(
$test
,
$mode
,
$expected
,
$actual
)
{
$this
->
test
=
$test
;
$this
->
mode
=
$mode
;
$this
->
expected
=
$expected
;
$this
->
actual
=
$actual
;
}
/**
* Whether the test passed
* @return bool
*/
public
function
isSuccess
()
{
return
$this
->
expected
===
$this
->
actual
;
}
public
function
getDescription
()
{
return
"{$this->test->testName} [{$this->mode}]"
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 17 2026, 18:47 (10 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
48/ec/82f947935db2351861e479516c7c
Default Alt Text
ParserTestResult.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment