3 class MediaWikiParserTestSuite
extends PHPUnit_Framework_TestSuite
{
7 public static function suite() {
11 public function __construct() {
12 $this->backend
= new ParserTestSuiteBackend
;
13 parent
::__construct();
14 $this->setName( 'Parser tests' );
17 public function run( PHPUnit_Framework_TestResult
$result = null, $filter = false,
18 array $groups = array(), array $excludeGroups = array(), $processIsolation = false
20 global $IP, $wgContLang, $wgMemc;
21 $wgContLang = Language
::factory( 'en' );
22 $wgMemc = new FakeMemCachedClient
;
23 $this->backend
->setupDatabase();
25 $iter = new TestFileIterator( "$IP/maintenance/parserTests.txt" );
26 $iter->setParser( $this->backend
);
29 foreach ( $iter as $test ) {
30 $this->addTest( new ParserUnitTest( $this, $test ) );
34 parent
::run( $result, $filter, $groups, $excludeGroups, $processIsolation );
36 $this->backend
->teardownDatabase();
39 public function count() {
43 public function toString() {
44 return "MediaWiki Parser Tests";
47 public function getBackend() {
48 return $this->backend
;
51 public function getIterator() {
52 return $this->iterator
;