aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/user/BotPasswordTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/user/BotPasswordTest.php')
-rw-r--r--tests/phpunit/includes/user/BotPasswordTest.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/phpunit/includes/user/BotPasswordTest.php b/tests/phpunit/includes/user/BotPasswordTest.php
index 2cafe5019f09..d68a41d1a4c2 100644
--- a/tests/phpunit/includes/user/BotPasswordTest.php
+++ b/tests/phpunit/includes/user/BotPasswordTest.php
@@ -1,6 +1,5 @@
<?php
-use MediaWiki\MediaWikiServices;
use MediaWiki\Session\SessionManager;
use Wikimedia\ScopedCallback;
use Wikimedia\TestingAccessWrapper;
@@ -58,7 +57,7 @@ class BotPasswordTest extends MediaWikiIntegrationTestCase {
}
public function addDBData() {
- $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory();
+ $passwordFactory = $this->getServiceContainer()->getPasswordFactory();
$passwordHash = $passwordFactory->newFromPlaintext( 'foobaz' );
$dbw = wfGetDB( DB_PRIMARY );
@@ -347,7 +346,7 @@ class BotPasswordTest extends MediaWikiIntegrationTestCase {
* @param string|null $password
*/
public function testSave( $password ) {
- $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory();
+ $passwordFactory = $this->getServiceContainer()->getPasswordFactory();
$bp = BotPassword::newUnsaved( [
'centralId' => 42,