Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
[lhc/web/wiklou.git] / tests / phpunit / includes / api / UserWrapper.php
index f8da0ff..9942a0f 100644 (file)
@@ -10,12 +10,12 @@ class UserWrapper {
                $this->password = $password;
 
                $this->user = User::newFromName( $this->userName );
-               if ( !$this->user->getID() ) {
-                       $this->user = User::createNew( $this->userName, array(
+               if ( !$this->user->getId() ) {
+                       $this->user = User::createNew( $this->userName, [
                                "email" => "test@example.com",
-                               "real_name" => "Test User" ) );
+                               "real_name" => "Test User" ] );
                }
-               $this->user->setPassword( $this->password );
+               TestUser::setPasswordForUser( $this->user, $this->password );
 
                if ( $group !== '' ) {
                        $this->user->addGroup( $group );