3 require_once( dirname( __FILE__
) . '/ParserHelpers.php' );
4 require_once( dirname(dirname(dirname( __FILE__
))) . '/bootstrap.php' );
11 * It's not really broken, but superseded
13 class MediaWikiParserTest
extends MediaWikiTestCase
{
14 public $count; // Number of tests in the suite.
15 public $articles = array(); // Array of test articles defined by the tests
20 $wgContLang = Language
::factory( 'en' );
22 $this->pt
= new PHPUnitParserTest
;
23 $this->pt
->setupDatabase();
28 if( is_object( $this->pt
) && $this->pt
instanceof PHPUnitParserTest
) {
29 $this->pt
->teardownDatabase();
35 public function testParserTests() {
37 //$wgParserTestFiles = array( "$IP/tests/parser/testparserTests.txt" );
39 global $wgParserTestFiles;
41 foreach( $wgParserTestFiles as $file ) {
43 $iter = new TestFileIterator( $file, $this->pt
);
46 foreach( $iter as $test ) {
47 $r = $this->pt
->runTest( $test['test'], $test['input'],
48 $test['result'], $test['options'], $test['config']
51 $this->assertTrue( $r, 'Parser test ' . $test['test'] );
55 catch( DBQueryError
$e ) {
56 $this->assertTrue( false, 'Parser test ' . $test['test'] . ' (error: "' . $e->getMessage() . '")' );
57 //This is annoying... it always stops on error and doesn't go to the next one.