Merge "Convert Special:NewFiles to use OOUI."
[lhc/web/wiklou.git] / tests / phpunit / includes / media / XMPValidateTest.php
index 53671d4..6a00629 100644 (file)
@@ -14,7 +14,7 @@ class XMPValidateTest extends MediaWikiTestCase {
        public function testValidateDate( $value, $expected ) {
                // The method should modify $value.
                $validate = new XMPValidate( new NullLogger() );
-               $validate->validateDate( array(), $value, true );
+               $validate->validateDate( [], $value, true );
                $this->assertEquals( $expected, $value );
        }
 
@@ -28,26 +28,26 @@ class XMPValidateTest extends MediaWikiTestCase {
                 * YYYY-MM-DDThh:mm:ss.sTZD
                 * (Time zone is optional)
                 */
-               return array(
-                       array( '1992', '1992' ),
-                       array( '1992-04', '1992:04' ),
-                       array( '1992-02-01', '1992:02:01' ),
-                       array( '2011-09-29', '2011:09:29' ),
-                       array( '1982-12-15T20:12', '1982:12:15 20:12' ),
-                       array( '1982-12-15T20:12Z', '1982:12:15 20:12' ),
-                       array( '1982-12-15T20:12+02:30', '1982:12:15 22:42' ),
-                       array( '1982-12-15T01:12-02:30', '1982:12:14 22:42' ),
-                       array( '1982-12-15T20:12:11', '1982:12:15 20:12:11' ),
-                       array( '1982-12-15T20:12:11Z', '1982:12:15 20:12:11' ),
-                       array( '1982-12-15T20:12:11+01:10', '1982:12:15 21:22:11' ),
-                       array( '2045-12-15T20:12:11', '2045:12:15 20:12:11' ),
-                       array( '1867-06-01T15:00:00', '1867:06:01 15:00:00' ),
+               return [
+                       [ '1992', '1992' ],
+                       [ '1992-04', '1992:04' ],
+                       [ '1992-02-01', '1992:02:01' ],
+                       [ '2011-09-29', '2011:09:29' ],
+                       [ '1982-12-15T20:12', '1982:12:15 20:12' ],
+                       [ '1982-12-15T20:12Z', '1982:12:15 20:12' ],
+                       [ '1982-12-15T20:12+02:30', '1982:12:15 22:42' ],
+                       [ '1982-12-15T01:12-02:30', '1982:12:14 22:42' ],
+                       [ '1982-12-15T20:12:11', '1982:12:15 20:12:11' ],
+                       [ '1982-12-15T20:12:11Z', '1982:12:15 20:12:11' ],
+                       [ '1982-12-15T20:12:11+01:10', '1982:12:15 21:22:11' ],
+                       [ '2045-12-15T20:12:11', '2045:12:15 20:12:11' ],
+                       [ '1867-06-01T15:00:00', '1867:06:01 15:00:00' ],
                        /* some invalid ones */
-                       array( '2001--12', null ),
-                       array( '2001-5-12', null ),
-                       array( '2001-5-12TZ', null ),
-                       array( '2001-05-12T15', null ),
-                       array( '2001-12T15:13', null ),
-               );
+                       [ '2001--12', null ],
+                       [ '2001-5-12', null ],
+                       [ '2001-5-12TZ', null ],
+                       [ '2001-05-12T15', null ],
+                       [ '2001-12T15:13', null ],
+               ];
        }
 }