Merge "Ensure OutputPageTest works when Translate extension is loaded"
[lhc/web/wiklou.git] / tests / phpunit / includes / BlockTest.php
index 1e46555..a921ee0 100644 (file)
@@ -35,6 +35,7 @@ class BlockTest extends MediaWikiLangTestCase {
                $blockOptions = [
                        'address' => $user->getName(),
                        'user' => $user->getId(),
+                       'by' => $this->getTestSysop()->getUser()->getId(),
                        'reason' => 'Parce que',
                        'expiry' => time() + 100500,
                ];
@@ -83,7 +84,7 @@ class BlockTest extends MediaWikiLangTestCase {
         * per T28425
         * @covers Block::__construct
         */
-       public function testBug26425BlockTimestampDefaultsToTime() {
+       public function testT28425BlockTimestampDefaultsToTime() {
                $user = $this->getUserForBlocking();
                $block = $this->addBlockForUser( $user );
                $madeAt = wfTimestamp( TS_MW );
@@ -102,10 +103,10 @@ class BlockTest extends MediaWikiLangTestCase {
         * because the new function didn't accept empty strings like Block::load()
         * had. Regression T31116.
         *
-        * @dataProvider provideBug29116Data
+        * @dataProvider provideT31116Data
         * @covers Block::newFromTarget
         */
-       public function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
+       public function testT31116NewFromTargetWithEmptyIp( $vagueTarget ) {
                $user = $this->getUserForBlocking();
                $initialBlock = $this->addBlockForUser( $user );
                $block = Block::newFromTarget( $user->getName(), $vagueTarget );
@@ -117,7 +118,7 @@ class BlockTest extends MediaWikiLangTestCase {
                );
        }
 
-       public static function provideBug29116Data() {
+       public static function provideT31116Data() {
                return [
                        [ null ],
                        [ '' ],
@@ -393,7 +394,7 @@ class BlockTest extends MediaWikiLangTestCase {
                $block = new Block(
                        /* address */ $username,
                        /* user */ 0,
-                       /* by */ 0,
+                       /* by */ $this->getTestSysop()->getUser()->getId(),
                        /* reason */ $reason,
                        /* timestamp */ 0,
                        /* auto */ false,