Skip to content
Snippets Groups Projects
Verified Commit 2fdab0bd authored by Dave Long's avatar Dave Long
Browse files

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

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

(cherry picked from commit 1ac46a2a)
parent 7cff4a62
Branches
Tags
6 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!3603#ISSUE 3346218 Add a different message on edit comment,!3555Issue #2473873: Views entity operations lack cacheability support, resulting in incorrect dropbuttons
......@@ -24,17 +24,6 @@ class UserPasswordResetTest extends WebDriverTestBase {
getTestFiles as drupalGetTestFiles;
}
/**
* The profile to install as a basis for testing.
*
* 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 $profile = 'standard';
/**
* The user object to test password resetting.
*
......@@ -45,7 +34,12 @@ class UserPasswordResetTest extends WebDriverTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['block'];
protected static $modules = ['block', 'test_user_config'];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
......@@ -54,7 +48,7 @@ protected function setUp(): void {
parent::setUp();
// Create a user.
$account = $this->drupalCreateUser();
$account = $this->drupalCreateUser(['access content']);
// Activate user by logging in.
$this->drupalLogin($account);
......@@ -65,7 +59,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 = REQUEST_TIME - mt_rand(10, 100000);
$account->login = \Drupal::time()->getRequestTime() - mt_rand(10, 100000);
Database::getConnection()->update('users_field_data')
->fields(['login' => $account->getLastLoginTime()])
->condition('uid', $account->id())
......
......@@ -2490,11 +2490,6 @@ 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment