MediaWiki
REL1_32
ParserTestFileSuite.php
Go to the documentation of this file.
1
<?php
2
8
class
ParserTestFileSuite
extends
PHPUnit_Framework_TestSuite {
9
private
$ptRunner
;
10
private
$ptFileName
;
11
private
$ptFileInfo
;
12
13
function
__construct
( $runner, $name, $fileName ) {
14
parent::__construct( $name );
15
$this->ptRunner = $runner;
16
$this->ptFileName = $fileName;
17
$this->ptFileInfo =
TestFileReader::read
( $this->ptFileName );
18
19
foreach
( $this->ptFileInfo[
'tests'
] as $test ) {
20
$this->addTest(
new
ParserIntegrationTest
( $runner, $fileName, $test ),
21
[
'Database'
,
'Parser'
,
'ParserTests'
] );
22
}
23
}
24
25
function
setUp
() {
26
if
( !$this->ptRunner->meetsRequirements( $this->ptFileInfo[
'requirements'
] ) ) {
27
$this->markTestSuiteSkipped(
'required extension not enabled'
);
28
}
else
{
29
$this->ptRunner->addArticles( $this->ptFileInfo[
'articles'
] );
30
}
31
}
32
}
ParserIntegrationTest
This is the TestCase subclass for running a single parser test via the ParserTestRunner integration t...
Definition
ParserIntegrationTest.php:30
ParserTestFileSuite
This is the suite class for running tests within a single .txt source file.
Definition
ParserTestFileSuite.php:8
ParserTestFileSuite\$ptFileInfo
$ptFileInfo
Definition
ParserTestFileSuite.php:11
ParserTestFileSuite\__construct
__construct( $runner, $name, $fileName)
Definition
ParserTestFileSuite.php:13
ParserTestFileSuite\$ptFileName
$ptFileName
Definition
ParserTestFileSuite.php:10
ParserTestFileSuite\$ptRunner
$ptRunner
Definition
ParserTestFileSuite.php:9
ParserTestFileSuite\setUp
setUp()
Definition
ParserTestFileSuite.php:25
TestFileReader\read
static read( $file, array $options=[])
Definition
TestFileReader.php:38
tests
phpunit
suites
ParserTestFileSuite.php
Generated on Mon Nov 25 2024 15:59:05 for MediaWiki by
1.10.0