$user = self::getMutableTestUser()->getUser();
$dbw = wfGetDB( DB_MASTER );
-
- $passwordFactory = new \PasswordFactory();
- $passwordFactory->init( \RequestContext::getMain()->getConfig() );
+ $config = MediaWikiServices::getInstance()->getMainConfig();
// A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
- $passwordFactory->setDefaultType( 'A' );
+ $passwordFactory = new \PasswordFactory( $config->get( 'PasswordConfig' ), 'A' );
+
$pwhash = $passwordFactory->newFromPlaintext( 'password' )->toString();
$provider = $this->getProvider();