From d612c218380c101ca00de8c384aa80b1a4079300 Mon Sep 17 00:00:00 2001 From: Thalia Date: Tue, 26 Feb 2019 22:15:31 +0000 Subject: [PATCH] Remove unnecessary variable from UserTest Change-Id: I2aaae36cc3102b309aa8f5ab05f512c4fbf9810c --- tests/phpunit/includes/user/UserTest.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index 863ff50bb3..64bdf31d63 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -599,7 +599,6 @@ class UserTest extends MediaWikiTestCase { ] ); // 1. Log in a test user, and block them. - $userBlocker = $this->getTestSysop()->getUser(); $user1tmp = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); $request1->getSession()->setUser( $user1tmp ); @@ -610,7 +609,6 @@ class UserTest extends MediaWikiTestCase { ] ); $block->setBlocker( $this->getTestSysop()->getUser() ); $block->setTarget( $user1tmp ); - $block->setBlocker( $userBlocker ); $res = $block->insert(); $this->assertTrue( (bool)$res['id'], 'Failed to insert block' ); $user1 = User::newFromSession( $request1 ); @@ -682,14 +680,12 @@ class UserTest extends MediaWikiTestCase { ] ); // 1. Log in a test user, and block them. - $userBlocker = $this->getTestSysop()->getUser(); $testUser = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); $request1->getSession()->setUser( $testUser ); $block = new Block( [ 'enableAutoblock' => true ] ); $block->setBlocker( $this->getTestSysop()->getUser() ); $block->setTarget( $testUser ); - $block->setBlocker( $userBlocker ); $res = $block->insert(); $this->assertTrue( (bool)$res['id'], 'Failed to insert block' ); $user = User::newFromSession( $request1 ); @@ -729,14 +725,12 @@ class UserTest extends MediaWikiTestCase { ] ); // 1. Log in a test user, and block them indefinitely. - $userBlocker = $this->getTestSysop()->getUser(); $user1Tmp = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); $request1->getSession()->setUser( $user1Tmp ); $block = new Block( [ 'enableAutoblock' => true, 'expiry' => 'infinity' ] ); $block->setBlocker( $this->getTestSysop()->getUser() ); $block->setTarget( $user1Tmp ); - $block->setBlocker( $userBlocker ); $res = $block->insert(); $this->assertTrue( (bool)$res['id'], 'Failed to insert block' ); $user1 = User::newFromSession( $request1 ); @@ -829,14 +823,12 @@ class UserTest extends MediaWikiTestCase { ] ); // 1. Log in a blocked test user. - $userBlocker = $this->getTestSysop()->getUser(); $user1tmp = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); $request1->getSession()->setUser( $user1tmp ); $block = new Block( [ 'enableAutoblock' => true ] ); $block->setBlocker( $this->getTestSysop()->getUser() ); $block->setTarget( $user1tmp ); - $block->setBlocker( $userBlocker ); $res = $block->insert(); $this->assertTrue( (bool)$res['id'], 'Failed to insert block' ); $user1 = User::newFromSession( $request1 ); @@ -876,14 +868,12 @@ class UserTest extends MediaWikiTestCase { ] ); // 1. Log in a blocked test user. - $userBlocker = $this->getTestSysop()->getUser(); $user1tmp = $this->getTestUser()->getUser(); $request1 = new FauxRequest(); $request1->getSession()->setUser( $user1tmp ); $block = new Block( [ 'enableAutoblock' => true ] ); $block->setBlocker( $this->getTestSysop()->getUser() ); $block->setTarget( $user1tmp ); - $block->setBlocker( $userBlocker ); $res = $block->insert(); $this->assertTrue( (bool)$res['id'], 'Failed to insert block' ); $user1 = User::newFromSession( $request1 ); -- 2.20.1