MediaWiki  1.29.2
ParserTestResult Class Reference

Represent the result of a parser test. More...

Public Member Functions

 __construct ( $test, $expected, $actual)
 
 getDescription ()
 
 isSuccess ()
 Whether the test passed. More...
 

Public Attributes

 $actual
 Actual text rendered. More...
 
 $expected
 Text that was expected. More...
 
 $test
 The test info array. More...
 

Detailed Description

Represent the result of a parser test.

Since
1.22

Definition at line 14 of file ParserTestResult.php.

Constructor & Destructor Documentation

◆ __construct()

ParserTestResult::__construct (   $test,
  $expected,
  $actual 
)
Parameters
array$testThe test info array from TestIterator
string$expectedThe normalized expected output
string$actualThe actual output

Definition at line 27 of file ParserTestResult.php.

References $actual, $expected, and $test.

Member Function Documentation

◆ getDescription()

ParserTestResult::getDescription ( )

Definition at line 41 of file ParserTestResult.php.

Referenced by ParserTestPrinter\showFailure().

◆ isSuccess()

ParserTestResult::isSuccess ( )

Whether the test passed.

Returns
bool

Definition at line 37 of file ParserTestResult.php.

References $actual.

Member Data Documentation

◆ $actual

ParserTestResult::$actual

Actual text rendered.

Definition at line 20 of file ParserTestResult.php.

Referenced by __construct(), and isSuccess().

◆ $expected

ParserTestResult::$expected

Text that was expected.

Definition at line 18 of file ParserTestResult.php.

Referenced by __construct().

◆ $test

ParserTestResult::$test

The test info array.

Definition at line 16 of file ParserTestResult.php.

Referenced by __construct().


The documentation for this class was generated from the following file: