X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fstructure%2FStructureTest.php;h=9016cb7b6791d6773a77c49b93db70978fa15abc;hb=22b38fbbb94e1dacb39e2611f3952707c7b5e685;hp=14461be691c6d3cd9a54fbc3f60a6f068a222b2c;hpb=e59e1e3c3b39642b6102567a23456cfc14b52ea7;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/structure/StructureTest.php b/tests/phpunit/structure/StructureTest.php index 14461be691..9016cb7b67 100644 --- a/tests/phpunit/structure/StructureTest.php +++ b/tests/phpunit/structure/StructureTest.php @@ -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." );