Merge "Introduce separate log action for deleting pages on move"
[lhc/web/wiklou.git] / tests / phpunit / includes / auth / TemporaryPasswordPrimaryAuthenticationProviderTest.php
index bc78c08..bc7d65e 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace MediaWiki\Auth;
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\ScopedCallback;
 
 /**
@@ -32,7 +33,7 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                }
                $config = new \MultiConfig( [
                        $this->config,
-                       \ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+                       MediaWikiServices::getInstance()->getMainConfig()
                ] );
 
                if ( !$this->manager ) {
@@ -347,7 +348,6 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                        'wrongpassword',
                        $ret->message->getKey()
                );
-
        }
 
        /**
@@ -521,10 +521,6 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $provider = $this->getProvider( [ 'emailEnabled' => false ] );
                $status = $provider->providerAllowsAuthenticationDataChange( $req, true );
                $this->assertEquals( \StatusValue::newFatal( 'passwordreset-emaildisabled' ), $status );
-               $req->hasBackchannel = true;
-               $status = $provider->providerAllowsAuthenticationDataChange( $req, true );
-               $this->assertFalse( $status->hasMessage( 'passwordreset-emaildisabled' ) );
-               $req->hasBackchannel = false;
 
                $provider = $this->getProvider( [ 'passwordReminderResendTime' => 10 ] );
                $status = $provider->providerAllowsAuthenticationDataChange( $req, true );
@@ -687,18 +683,10 @@ class TemporaryPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestC
                $provider = $this->getProvider( [ 'emailEnabled' => false ] );
                $status = $provider->testForAccountCreation( $user, $creator, [ $req ] );
                $this->assertEquals( \StatusValue::newFatal( 'emaildisabled' ), $status );
-               $req->hasBackchannel = true;
-               $status = $provider->testForAccountCreation( $user, $creator, [ $req ] );
-               $this->assertFalse( $status->hasMessage( 'emaildisabled' ) );
-               $req->hasBackchannel = false;
 
                $provider = $this->getProvider( [ 'emailEnabled' => true ] );
                $status = $provider->testForAccountCreation( $user, $creator, [ $req ] );
                $this->assertEquals( \StatusValue::newFatal( 'noemailcreate' ), $status );
-               $req->hasBackchannel = true;
-               $status = $provider->testForAccountCreation( $user, $creator, [ $req ] );
-               $this->assertFalse( $status->hasMessage( 'noemailcreate' ) );
-               $req->hasBackchannel = false;
 
                $user->setEmail( 'test@localhost.localdomain' );
                $status = $provider->testForAccountCreation( $user, $creator, [ $req ] );