MediaWiki  1.30.0
TestFileReader Class Reference

Static Public Member Functions

static read ( $file, array $options=[])
 

Private Member Functions

 __construct ( $file, $options)
 
 addArticle ( $name, $text, $line)
 
 addCurrentTest ()
 
 addRequirement ( $type, $name)
 
 checkSection ( $tokens, $fatal=true)
 Verify the current section data has some value for the given token name(s) (first parameter). More...
 
 clearSection ()
 Clear section name and its data. More...
 
 execute ()
 

Private Attributes

 $articles = []
 
 $fh
 
 $file
 
 $lineNum = 0
 
 $regex
 
 $requirements = []
 
 $runDisabled
 
 $runParsoid
 
 $section = null
 
 $sectionData = []
 String|null: current test section being analyzed. More...
 
 $sectionLineNum = []
 
 $tests = []
 

Detailed Description

Definition at line 22 of file TestFileReader.php.

Constructor & Destructor Documentation

◆ __construct()

TestFileReader::__construct (   $file,
  $options 
)
private

Definition at line 59 of file TestFileReader.php.

References $file, $options, and file.

Member Function Documentation

◆ addArticle()

TestFileReader::addArticle (   $name,
  $text,
  $line 
)
private

Definition at line 323 of file TestFileReader.php.

References $file, $line, and $name.

Referenced by execute().

◆ addCurrentTest()

TestFileReader::addCurrentTest ( )
private

Definition at line 77 of file TestFileReader.php.

References $file, $input, and checkSection().

Referenced by execute().

◆ addRequirement()

TestFileReader::addRequirement (   $type,
  $name 
)
private

Definition at line 332 of file TestFileReader.php.

References $name, and $type.

Referenced by execute().

◆ checkSection()

TestFileReader::checkSection (   $tokens,
  $fatal = true 
)
private

Verify the current section data has some value for the given token name(s) (first parameter).

Throw an exception if it is not set, referencing current section and adding the current file name and line number

Parameters
string | array$tokensExpected token(s) that should have been mentioned before closing this section
bool$fatalTrue iff an exception should be thrown if the section is not found.
Returns
bool|string
Exceptions
MWException

Definition at line 282 of file TestFileReader.php.

References $sectionData, $tokens, captcha-old\count, file, and use.

Referenced by addCurrentTest(), and execute().

◆ clearSection()

TestFileReader::clearSection ( )
private

Clear section name and its data.

Definition at line 263 of file TestFileReader.php.

Referenced by execute().

◆ execute()

TestFileReader::execute ( )
private

◆ read()

static TestFileReader::read (   $file,
array  $options = [] 
)
static

Member Data Documentation

◆ $articles

TestFileReader::$articles = []
private

Definition at line 34 of file TestFileReader.php.

◆ $fh

TestFileReader::$fh
private

Definition at line 24 of file TestFileReader.php.

◆ $file

TestFileReader::$file
private

Definition at line 23 of file TestFileReader.php.

Referenced by __construct(), addArticle(), addCurrentTest(), and read().

◆ $lineNum

TestFileReader::$lineNum = 0
private

Definition at line 29 of file TestFileReader.php.

Referenced by execute().

◆ $regex

TestFileReader::$regex
private

Definition at line 32 of file TestFileReader.php.

◆ $requirements

TestFileReader::$requirements = []
private

Definition at line 35 of file TestFileReader.php.

Referenced by read().

◆ $runDisabled

TestFileReader::$runDisabled
private

Definition at line 30 of file TestFileReader.php.

◆ $runParsoid

TestFileReader::$runParsoid
private

Definition at line 31 of file TestFileReader.php.

◆ $section

TestFileReader::$section = null
private

Definition at line 25 of file TestFileReader.php.

Referenced by execute().

◆ $sectionData

TestFileReader::$sectionData = []
private

String|null: current test section being analyzed.

Definition at line 27 of file TestFileReader.php.

Referenced by checkSection().

◆ $sectionLineNum

TestFileReader::$sectionLineNum = []
private

Definition at line 28 of file TestFileReader.php.

◆ $tests

TestFileReader::$tests = []
private

Definition at line 36 of file TestFileReader.php.


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