User Cleanup does not appear to be working

Created on 12 April 2024, 3 months ago
Updated 25 April 2024, 2 months ago

Problem/Motivation

I have the following test

<?php
  /**
   * @test
   * @group user
   * @ticket DXWD-552
   */
  public function basicUserCanLoginViaEmail() {
    $user = $this->createUser([], null, FALSE, self::FIELDS);
    $this->visit('/user/login');
    $this->submitForm([
      'Username or Email Address' => $user->getEmail(),
      'Password' => $user->pass_raw,
    ], 'Log in');
    $this->assertSession()->statusCodeEquals(200);
    $this->drupalUserIsLoggedIn($user);
    $this->assertSession()->pageTextContains('My Dashboard');
  }
?>

When the test runs, it does not cleanup the user afterwards. This test extends the ExistingSiteBase class.

Steps to reproduce

1. open a database connection and run SELECT uid FROM users ORDER BY uid DESC LIMIT 1; and note the user id.
2. Run the above test.
3. Run step 1 again, the user id of the most recent user will be increased by one.
4. Login to the site UI, you should see an additional user that was not there before the test.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dustinleblanc Ithaca, NY

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024