-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a test for identifying a bug in password update
- Loading branch information
Mārtiņš Tereško
committed
Jul 28, 2017
1 parent
94b9ecb
commit 79609bf
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,6 +277,22 @@ public function test_Rehashing_of_Outdated_Password_on_Login() | |
$this->assertStringStartsWith('$2y$11', $affected->getHash()); | ||
} | ||
|
||
/** | ||
* @depends test_Rehashing_of_Outdated_Password_on_Login | ||
*/ | ||
public function test_Logging_in_After_Password_has_been_Updated() | ||
{ | ||
$factory = new MapperFactory($this->connection, 'identities'); | ||
$logger = $this->getMockBuilder(LoggerInterface::class)->getMock(); | ||
|
||
$identification = new Identification($factory, $logger, Identification::DEFAULT_COOKIE_LIFESPAN, 11); | ||
|
||
$identity = $this->search->findEmailIdentityByEmailAddress('[email protected]'); | ||
$cookie = $identification->loginWithPassword($identity, 'qwerty'); | ||
$this->assertSame(9, $cookie->getAccountId()); | ||
} | ||
|
||
|
||
/** | ||
* @depends test_Account_Registration | ||
*/ | ||
|