Follow-up e213462f7c61c: fix typo ("constriant" -> "constraint")
[lhc/web/wiklou.git] / tests / phpunit / includes / mail / MailAddressTest.php
index 1fc63d9..c837d26 100644 (file)
@@ -17,7 +17,7 @@ class MailAddressTest extends MediaWikiTestCase {
                if ( wfIsWindows() ) {
                        $this->markTestSkipped( 'This test only works on non-Windows platforms' );
                }
-               $user = $this->getMock( 'User' );
+               $user = $this->createMock( 'User' );
                $user->expects( $this->any() )->method( 'getName' )->will(
                        $this->returnValue( 'UserName' )
                );
@@ -50,16 +50,16 @@ class MailAddressTest extends MediaWikiTestCase {
        }
 
        public static function provideToString() {
-               return array(
-                       array( true, 'foo@bar.baz', 'FooBar', 'Foo Bar', 'Foo Bar <foo@bar.baz>' ),
-                       array( true, 'foo@bar.baz', 'UserName', null, 'UserName <foo@bar.baz>' ),
-                       array( true, 'foo@bar.baz', 'AUser', 'My real name', 'My real name <foo@bar.baz>' ),
-                       array( true, 'foo@bar.baz', 'A.user.name', 'my@real.name', '"my@real.name" <foo@bar.baz>' ),
-                       array( false, 'foo@bar.baz', 'AUserName', 'Some real name', 'AUserName <foo@bar.baz>' ),
-                       array( false, 'foo@bar.baz', '', '', 'foo@bar.baz' ),
-                       array( true, 'foo@bar.baz', '', '', 'foo@bar.baz' ),
-                       array( true, '', '', '', '' ),
-               );
+               return [
+                       [ true, 'foo@bar.baz', 'FooBar', 'Foo Bar', 'Foo Bar <foo@bar.baz>' ],
+                       [ true, 'foo@bar.baz', 'UserName', null, 'UserName <foo@bar.baz>' ],
+                       [ true, 'foo@bar.baz', 'AUser', 'My real name', 'My real name <foo@bar.baz>' ],
+                       [ true, 'foo@bar.baz', 'A.user.name', 'my@real.name', '"my@real.name" <foo@bar.baz>' ],
+                       [ false, 'foo@bar.baz', 'AUserName', 'Some real name', 'AUserName <foo@bar.baz>' ],
+                       [ false, 'foo@bar.baz', '', '', 'foo@bar.baz' ],
+                       [ true, 'foo@bar.baz', '', '', 'foo@bar.baz' ],
+                       [ true, '', '', '', '' ],
+               ];
        }
 
        /**