Merge "StringUtils: Add a utility for checking if a string is a valid regex"
[lhc/web/wiklou.git] / tests / phpunit / includes / TestUser.php
index 952a662..ca2e99f 100644 (file)
@@ -24,9 +24,7 @@ class TestUser {
 
        private function assertNotReal() {
                global $wgDBprefix;
-               if ( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX &&
-                       $wgDBprefix !== MediaWikiTestCase::ORA_DB_PREFIX
-               ) {
+               if ( $wgDBprefix !== MediaWikiTestCase::DB_PREFIX ) {
                        throw new MWException( "Can't create user on real database" );
                }
        }
@@ -143,7 +141,7 @@ class TestUser {
                }
 
                $passwordFactory = MediaWikiServices::getInstance()->getPasswordFactory();
-               if ( !$passwordFactory->newFromCiphertext( $row->user_password )->equals( $password ) ) {
+               if ( !$passwordFactory->newFromCiphertext( $row->user_password )->verify( $password ) ) {
                        $passwordHash = $passwordFactory->newFromPlaintext( $password );
                        $dbw->update(
                                'user',