Skip to content

Commit

Permalink
don't let useEmailAsUsername linger in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Sep 20, 2024
1 parent 597508a commit 105705f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/services/UsersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ public function testUserActivationEmailAsUsernameWithAnUnverifedEmail(): void

self::assertSame(User::STATUS_ACTIVE, $user->getStatus());
self::assertSame('jsmith@gmail.com', $user->username);

Craft::$app->getConfig()->getGeneral()->useEmailAsUsername = false;
}

/**
Expand All @@ -139,6 +141,8 @@ public function testUserActivationEmailAsUsernameWithNoUnverifedEmail(): void

self::assertSame(User::STATUS_ACTIVE, $user->getStatus());
self::assertSame('jsmith', $user->username);

Craft::$app->getConfig()->getGeneral()->useEmailAsUsername = false;
}

/**
Expand Down

0 comments on commit 105705f

Please sign in to comment.