MediaWiki REL1_28
DbTestPreviewer Class Reference
Inheritance diagram for DbTestPreviewer:
Collaboration diagram for DbTestPreviewer:

Public Member Functions

 __construct ( $db, $filter=false)
 This should be called before the table prefix is changed.
 
 record ( $test, ParserTestResult $result)
 Called after each test.
 
 report ()
 Called before finishing the test run.
 
 start ()
 Set up result recording; insert a record for the run with the date and all that fun stuff.
 
- Public Member Functions inherited from TestRecorder
 end ()
 Called at the end of the parser test run.
 
 endSuite ( $path)
 Called after ending an input file.
 
 skipped ( $test, $subtest)
 Mark a test skipped.
 
 startSuite ( $path)
 Called before starting an input file.
 
 startTest ( $test)
 Called before starting a test.
 
 warning ( $message)
 Show a warning to the user.
 

Protected Attributes

 $curRun
 
 $db
 
 $filter
 
 $lb
 
 $prevRun
 
 $results
 

Private Member Functions

 getTestStatusInfo ( $testname, $after)
 Returns a string giving information about when a test last had a status change.
 

Detailed Description

Definition at line 22 of file DbTestPreviewer.php.

Constructor & Destructor Documentation

◆ __construct()

DbTestPreviewer::__construct (   $db,
  $filter = false 
)

This should be called before the table prefix is changed.

Definition at line 33 of file DbTestPreviewer.php.

References $db, and $filter.

Member Function Documentation

◆ getTestStatusInfo()

DbTestPreviewer::getTestStatusInfo (   $testname,
  $after 
)
private

Returns a string giving information about when a test last had a status change.

Could help to track down when regressions were introduced, as distinct from tests which have never passed (which are more change requests than regressions).

Parameters
string$testname
string$after
Returns
string

Definition at line 141 of file DbTestPreviewer.php.

References $pre.

Referenced by report().

◆ record()

DbTestPreviewer::record (   $test,
ParserTestResult  $result 
)

Called after each test.

Parameters
array$test
ParserTestResult$result

Reimplemented from TestRecorder.

Definition at line 56 of file DbTestPreviewer.php.

◆ report()

DbTestPreviewer::report ( )

Called before finishing the test run.

Reimplemented from TestRecorder.

Definition at line 60 of file DbTestPreviewer.php.

References $code, $count, $filter, $res, as, getTestStatusInfo(), and print.

◆ start()

DbTestPreviewer::start ( )

Set up result recording; insert a record for the run with the date and all that fun stuff.

Reimplemented from TestRecorder.

Definition at line 42 of file DbTestPreviewer.php.

References print.

Member Data Documentation

◆ $curRun

DbTestPreviewer::$curRun
protected

Definition at line 26 of file DbTestPreviewer.php.

◆ $db

DbTestPreviewer::$db
protected

Definition at line 25 of file DbTestPreviewer.php.

Referenced by __construct().

◆ $filter

DbTestPreviewer::$filter
protected

Definition at line 23 of file DbTestPreviewer.php.

Referenced by __construct(), and report().

◆ $lb

DbTestPreviewer::$lb
protected

Definition at line 24 of file DbTestPreviewer.php.

◆ $prevRun

DbTestPreviewer::$prevRun
protected

Definition at line 27 of file DbTestPreviewer.php.

◆ $results

DbTestPreviewer::$results
protected

Definition at line 28 of file DbTestPreviewer.php.


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