X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fregistration%2FCoreVersionCheckerTest.php;h=1dfcd822267c12f7791ca9d91d37694e844f8e41;hb=f23a96417022ad3081fd1e57ea4d9b2643633ba4;hp=bc154b3713d99549261708ee34e5e960e63efd76;hpb=e475700141c34360f7d287ba618be70e96fab70a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/registration/CoreVersionCheckerTest.php b/tests/phpunit/includes/registration/CoreVersionCheckerTest.php index bc154b3713..1dfcd82226 100644 --- a/tests/phpunit/includes/registration/CoreVersionCheckerTest.php +++ b/tests/phpunit/includes/registration/CoreVersionCheckerTest.php @@ -13,26 +13,26 @@ class CoreVersionCheckerTest extends PHPUnit_Framework_TestCase { } public static function provideCheck() { - return array( - // array( $wgVersion, constraint, expected ) - array( '1.25alpha', '>= 1.26', false ), - array( '1.25.0', '>= 1.26', false ), - array( '1.26alpha', '>= 1.26', true ), - array( '1.26alpha', '>= 1.26.0', true ), - array( '1.26alpha', '>= 1.26.0-stable', false ), - array( '1.26.0', '>= 1.26.0-stable', true ), - array( '1.26.1', '>= 1.26.0-stable', true ), - array( '1.27.1', '>= 1.26.0-stable', true ), - array( '1.26alpha', '>= 1.26.1', false ), - array( '1.26alpha', '>= 1.26alpha', true ), - array( '1.26alpha', '>= 1.25', true ), - array( '1.26.0-alpha.14', '>= 1.26.0-alpha.15', false ), - array( '1.26.0-alpha.14', '>= 1.26.0-alpha.10', true ), - array( '1.26.1', '>= 1.26.2, <=1.26.0', false ), - array( '1.26.1', '^1.26.2', false ), + return [ + // [ $wgVersion, constraint, expected ] + [ '1.25alpha', '>= 1.26', false ], + [ '1.25.0', '>= 1.26', false ], + [ '1.26alpha', '>= 1.26', true ], + [ '1.26alpha', '>= 1.26.0', true ], + [ '1.26alpha', '>= 1.26.0-stable', false ], + [ '1.26.0', '>= 1.26.0-stable', true ], + [ '1.26.1', '>= 1.26.0-stable', true ], + [ '1.27.1', '>= 1.26.0-stable', true ], + [ '1.26alpha', '>= 1.26.1', false ], + [ '1.26alpha', '>= 1.26alpha', true ], + [ '1.26alpha', '>= 1.25', true ], + [ '1.26.0-alpha.14', '>= 1.26.0-alpha.15', false ], + [ '1.26.0-alpha.14', '>= 1.26.0-alpha.10', true ], + [ '1.26.1', '>= 1.26.2, <=1.26.0', false ], + [ '1.26.1', '^1.26.2', false ], // Accept anything for un-parsable version strings - array( '1.26mwf14', '== 1.25alpha', true ), - array( 'totallyinvalid', '== 1.0', true ), - ); + [ '1.26mwf14', '== 1.25alpha', true ], + [ 'totallyinvalid', '== 1.0', true ], + ]; } }