Skip to content

Commit

Permalink
Created a test for identifying a bug in password update
Browse files Browse the repository at this point in the history
  • 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.
16 changes: 16 additions & 0 deletions tests/integration/CombinedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 79609bf

Please sign in to comment.