From 60d4bd86b24129347fda576d7a54cb200102f5c1 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sun, 12 Apr 2015 11:10:48 +0100
Subject: [PATCH] Issue #2469269 by Berdir: Don't use a form submission to
 check the password in MigrateUserTest

---
 .../migrate_drupal/src/Tests/d6/MigrateUserTest.php        | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php
index 5ed9a9b8bf4e..eea30a15e442 100644
--- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php
@@ -177,12 +177,9 @@ public function testUser() {
         $this->assertIdentical(basename($source->picture), $file->getFilename());
       }
 
-      // Use the UI to check if the password has been salted and re-hashed to
+      // Use the API to check if the password has been salted and re-hashed to
       // conform the Drupal >= 7.
-      $credentials = array('name' => $source->name, 'pass' => $source->pass_plain);
-      $this->drupalPostForm('user/login', $credentials, t('Log in'));
-      $this->assertNoRaw(t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>', array('@password' => \Drupal::url('user.pass', [], array('query' => array('name' => $source->name))))));
-      $this->drupalLogout();
+      $this->assertTrue(\Drupal::service('password')->check($source->pass_plain, $user));
     }
   }
 
-- 
GitLab