Index: trunk/phase3/tests/phpunit/includes/parser/MediaWikiParserTest.php |
— | — | @@ -1,35 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -require_once( dirname( __FILE__ ) . '/ParserHelpers.php' ); |
5 | | -require_once( dirname( __FILE__ ) . '/NewParserTest.php' ); |
6 | | -require_once( dirname(dirname(dirname( __FILE__ ))) . '/bootstrap.php' ); |
7 | | - |
8 | | -/** |
9 | | - * The UnitTest must be either a class that inherits from PHPUnit_Framework_TestCase |
10 | | - * or a class that provides a public static suite() method which returns |
11 | | - * an PHPUnit_Framework_Test object |
12 | | - * |
13 | | - * @group Parser |
14 | | - * @group Database |
15 | | - */ |
16 | | -class MediaWikiParserTest { |
17 | | - |
18 | | - public static function suite() { |
19 | | - global $wgParserTestFiles; |
20 | | - |
21 | | - $suite = new PHPUnit_Framework_TestSuite; |
22 | | - |
23 | | - foreach ( $wgParserTestFiles as $filename ) { |
24 | | - $testsName = basename( $filename, '.txt' ); |
25 | | - $className = /*ucfirst( basename( dirname( $filename ) ) ) .*/ ucfirst( basename( $filename, '.txt' ) ); |
26 | | - |
27 | | - eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = \"" . addslashes( $filename ) . "\"; } " ); |
28 | | - |
29 | | - $parserTester = new $className( $testsName ); |
30 | | - $suite->addTestSuite( new ReflectionClass ( $parserTester ) ); |
31 | | - } |
32 | | - |
33 | | - |
34 | | - return $suite; |
35 | | - } |
36 | | -} |