Merge "Pass database connection to SpecialWatchlist::countItems"
[lhc/web/wiklou.git] / tests / phpunit / StructureTest.php
index f967c18..dfbcc9d 100644 (file)
@@ -8,6 +8,7 @@ class StructureTest extends MediaWikiTestCase {
        /**
         * Verify all files that appear to be tests have file names ending in
         * Test.  If the file names do not end in Test, they will not be run.
+        * @group medium
         */
        public function testUnitTestFileNamesEndWithTest() {
                if ( wfIsWindows() ) {
@@ -20,6 +21,7 @@ class StructureTest extends MediaWikiTestCase {
                        'MediaWikiLangTestCase',
                        'MediaWikiTestCase',
                        'PHPUnit_Framework_TestCase',
+                       'DumpTestCase',
                ) );
                $testClassRegex = "^class .* extends ($testClassRegex)";
                $finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
@@ -39,11 +41,14 @@ class StructureTest extends MediaWikiTestCase {
                        $results,
                        array( $this, 'filterSuites' )
                );
-
+               $strip = strlen( $rootPath ) - 1;
+               foreach( $results as $k => $v) {
+                       $results[$k] = substr( $v, $strip );
+               }
                $this->assertEquals(
                        array(),
                        $results,
-                       'Unit test file names must end with Test.'
+                       "Unit test file in $rootPath must end with Test."
                );
        }