diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /tests/phpunit/includes/parser/MediaWikiParserTest.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'tests/phpunit/includes/parser/MediaWikiParserTest.php')
-rw-r--r-- | tests/phpunit/includes/parser/MediaWikiParserTest.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/phpunit/includes/parser/MediaWikiParserTest.php b/tests/phpunit/includes/parser/MediaWikiParserTest.php new file mode 100644 index 00000000..18510d9a --- /dev/null +++ b/tests/phpunit/includes/parser/MediaWikiParserTest.php @@ -0,0 +1,34 @@ +<?php + +require_once( dirname( __FILE__ ) . '/ParserHelpers.php' ); +require_once( dirname( __FILE__ ) . '/NewParserTest.php' ); + +/** + * The UnitTest must be either a class that inherits from PHPUnit_Framework_TestCase + * or a class that provides a public static suite() method which returns + * an PHPUnit_Framework_Test object + * + * @group Parser + * @group Database + */ +class MediaWikiParserTest { + + public static function suite() { + global $wgParserTestFiles; + + $suite = new PHPUnit_Framework_TestSuite; + + foreach ( $wgParserTestFiles as $filename ) { + $testsName = basename( $filename, '.txt' ); + $className = /*ucfirst( basename( dirname( $filename ) ) ) .*/ ucfirst( basename( $filename, '.txt' ) ); + + eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = \"" . addslashes( $filename ) . "\"; } " ); + + $parserTester = new $className( $testsName ); + $suite->addTestSuite( new ReflectionClass ( $parserTester ) ); + } + + + return $suite; + } +} |