findActiveByAccountIdentifierAndAuthenticationProviderName() публичный Метод

Returns the account for a specific authentication provider with the given identifier if it's not expired
public findActiveByAccountIdentifierAndAuthenticationProviderName ( string $accountIdentifier, string $authenticationProviderName ) : Account
$accountIdentifier string The account identifier
$authenticationProviderName string The authentication provider name
Результат Account
 /**
  * @test
  */
 public function authenticationWithCorrectCredentialsResetsFailedAuthenticationCount()
 {
     $this->authenticationToken->_set('credentials', ['username' => 'username', 'password' => 'wrongPW']);
     $this->persistedUsernamePasswordProvider->authenticate($this->authenticationToken);
     $account = $this->accountRepository->findActiveByAccountIdentifierAndAuthenticationProviderName('username', 'myTestProvider');
     $this->assertEquals(1, $account->getFailedAuthenticationCount());
     $this->authenticationToken->_set('credentials', ['username' => 'username', 'password' => 'password']);
     $this->persistedUsernamePasswordProvider->authenticate($this->authenticationToken);
     $account = $this->accountRepository->findActiveByAccountIdentifierAndAuthenticationProviderName('username', 'myTestProvider');
     $this->assertEquals((new \DateTime())->format(\DateTime::W3C), $account->getLastSuccessfulAuthenticationDate()->format(\DateTime::W3C));
     $this->assertEquals(0, $account->getFailedAuthenticationCount());
 }