From: Aaron Schulz Date: Tue, 28 Feb 2012 02:32:59 +0000 (+0000) Subject: r112563: Removed random bogus user IDs passed into to Block constructor in tests X-Git-Tag: 1.31.0-rc.0~24474 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=ea6b51694eb44843016fce98c010a21e705edb23;p=lhc%2Fweb%2Fwiklou.git r112563: Removed random bogus user IDs passed into to Block constructor in tests --- diff --git a/tests/phpunit/includes/BlockTest.php b/tests/phpunit/includes/BlockTest.php index 022da219ce..749f40b480 100644 --- a/tests/phpunit/includes/BlockTest.php +++ b/tests/phpunit/includes/BlockTest.php @@ -35,7 +35,7 @@ class BlockTest extends MediaWikiLangTestCase { $oldBlock->delete(); } - $this->block = new Block( 'UTBlockee', 1, 0, + $this->block = new Block( 'UTBlockee', $user->getID(), 0, 'Parce que', 0, false, time() + 100500 ); $this->madeAt = wfTimestamp( TS_MW ); diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 4c6ad929f8..f62ac5dd72 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -629,7 +629,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase { $prev = time(); $now = time() + 120; $this->user->mBlockedby = $this->user->getId(); - $this->user->mBlock = new Block( '127.0.8.1', $this->user->getId(), $this->user->getId(), + $this->user->mBlock = new Block( '127.0.8.1', 0, $this->user->getId(), 'no reason given', $prev + 3600, 1, 0 ); $this->user->mBlock->mTimestamp = 0; $this->assertEquals( array( array( 'autoblockedtext', @@ -646,7 +646,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase { global $wgLocalTZoffset; $wgLocalTZoffset = -60; $this->user->mBlockedby = $this->user->getName(); - $this->user->mBlock = new Block( '127.0.8.1', 2, 1, 'no reason given', $now, 0, 10 ); + $this->user->mBlock = new Block( '127.0.8.1', 0, 1, 'no reason given', $now, 0, 10 ); $this->assertEquals( array( array( 'blockedtext', '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1', 'Useruser', null, '23:00, 31 December 1969', '127.0.8.1',