Merge "Remove very, very old disabled test cases and todos"
[lhc/web/wiklou.git] / tests / phpunit / structure / StructureTest.php
index f5cd892..9016cb7 100644 (file)
@@ -15,7 +15,7 @@ class StructureTest extends MediaWikiTestCase {
                        $this->markTestSkipped( 'This test does not work on Windows' );
                }
                $rootPath = escapeshellarg( __DIR__ . '/..' );
-               $testClassRegex = implode( '|', array(
+               $testClassRegex = implode( '|', [
                        'ApiFormatTestBase',
                        'ApiTestCase',
                        'ApiQueryTestBase',
@@ -26,7 +26,7 @@ class StructureTest extends MediaWikiTestCase {
                        'ResourceLoaderTestCase',
                        'PHPUnit_Framework_TestCase',
                        'DumpTestCase',
-               ) );
+               ] );
                $testClassRegex = "^class .* extends ($testClassRegex)";
                $finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
                        " | xargs grep -El '$testClassRegex|function suite\('";
@@ -43,14 +43,14 @@ class StructureTest extends MediaWikiTestCase {
 
                $results = array_filter(
                        $results,
-                       array( $this, 'filterSuites' )
+                       [ $this, 'filterSuites' ]
                );
                $strip = strlen( $rootPath ) - 1;
                foreach ( $results as $k => $v ) {
                        $results[$k] = substr( $v, $strip );
                }
                $this->assertEquals(
-                       array(),
+                       [],
                        $results,
                        "Unit test file in $rootPath must end with Test."
                );
@@ -58,6 +58,8 @@ class StructureTest extends MediaWikiTestCase {
 
        /**
         * Filter to remove testUnitTestFileNamesEndWithTest false positives.
+        * @param string $filename
+        * @return bool
         */
        public function filterSuites( $filename ) {
                return strpos( $filename, __DIR__ . '/../suites/' ) !== 0;