Replace use of assertType with assertInternalType and assertInstanceOf
[lhc/web/wiklou.git] / tests / phpunit / includes / TestUser.php
index 39822dc..754568d 100644 (file)
@@ -28,7 +28,7 @@ class TestUser {
 
        private function assertNotReal() {
                global $wgDBprefix;
-               if( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX && $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX ) {
+               if ( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX && $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX ) {
                        throw new MWException( "Can't create user on real database" );
                }
        }
@@ -114,9 +114,9 @@ class TestUser {
                $passwordFactory = $this->user->getPasswordFactory();
                $oldDefaultType = $passwordFactory->getDefaultType();
 
-                // B is salted MD5 (thus fast) ... we don't care about security here, this is test only
-               $passwordFactory->setDefaultType( 'B' ); // @TODO: Change this to A once that is fixed: https://gerrit.wikimedia.org/r/167523
-               $newPassword = $passwordFactory->newFromPlaintext( $password , $this->user->getPassword() );
+               // A is unsalted MD5 (thus fast) ... we don't care about security here, this is test only
+               $passwordFactory->setDefaultType( 'A' );
+               $newPassword = $passwordFactory->newFromPlaintext( $password, $this->user->getPassword() );
 
                $change = false;
                if ( !$this->user->getPassword()->equals( $newPassword ) ) {