Verified Commit 9f7a8d2e authored by Dave Long's avatar Dave Long
Browse files

Revert "Issue #3308920 by jungle, smustgrave, Lendude: Fix test performance of...

Revert "Issue #3308920 by jungle, smustgrave, Lendude: Fix test performance of Drupal\Tests\user\FunctionalJavascript\UserPasswordResetTest"

This reverts commit 2fdab0bd.
parent 843e0a80
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -25,21 +25,27 @@ class UserPasswordResetTest extends WebDriverTestBase {
  }

  /**
   * The user object to test password resetting.
   * The profile to install as a basis for testing.
   *
   * @var \Drupal\user\UserInterface
   * This test uses the standard profile to test the password reset in
   * combination with an ajax request provided by the user picture configuration
   * in the standard profile.
   *
   * @var string
   */
  protected $account;
  protected $profile = 'standard';

  /**
   * {@inheritdoc}
   * The user object to test password resetting.
   *
   * @var \Drupal\user\UserInterface
   */
  protected static $modules = ['block', 'test_user_config'];
  protected $account;

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  protected static $modules = ['block'];

  /**
   * {@inheritdoc}
@@ -48,7 +54,7 @@ protected function setUp(): void {
    parent::setUp();

    // Create a user.
    $account = $this->drupalCreateUser(['access content']);
    $account = $this->drupalCreateUser();

    // Activate user by logging in.
    $this->drupalLogin($account);
@@ -59,7 +65,7 @@ protected function setUp(): void {

    // Set the last login time that is used to generate the one-time link so
    // that it is definitely over a second ago.
    $account->login = \Drupal::time()->getRequestTime() - mt_rand(10, 100000);
    $account->login = REQUEST_TIME - mt_rand(10, 100000);
    Database::getConnection()->update('users_field_data')
      ->fields(['login' => $account->getLastLoginTime()])
      ->condition('uid', $account->id())
+5 −0
Original line number Diff line number Diff line
@@ -2475,6 +2475,11 @@ parameters:
			count: 1
			path: modules/user/tests/src/Functional/Views/UserChangedTest.php

		-
			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
			count: 1
			path: modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php

		-
			message: "#^Variable \\$result in isset\\(\\) always exists and is not nullable\\.$#"
			count: 1