Update declaration of UploadFromUrlTest::doApiRequest
[lhc/web/wiklou.git] / tests / phpunit / structure / StructureTest.php
index 14461be..4df791e 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',
@@ -25,8 +25,10 @@ class StructureTest extends MediaWikiTestCase {
                        'MediaWikiTestCase',
                        'ResourceLoaderTestCase',
                        'PHPUnit_Framework_TestCase',
+                       '\\?PHPUnit\\Framework\\TestCase',
+                       'TestCase', // \PHPUnit\Framework\TestCase with appropriate use statement
                        'DumpTestCase',
-               ) );
+               ] );
                $testClassRegex = "^class .* extends ($testClassRegex)";
                $finder = "find $rootPath -name '*.php' '!' -name '*Test.php'" .
                        " | xargs grep -El '$testClassRegex|function suite\('";
@@ -43,14 +45,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."
                );