示例#1
0
文件: AuthTest.php 项目: spryker/Auth
 /**
  * @return void
  */
 public function testIsAuthorizedWithYvesCredentialsFromConfigMustReturnTrue()
 {
     $token = new StaticToken();
     $authConfig = Config::get(AuthConstants::AUTH_DEFAULT_CREDENTIALS);
     $rawToken = $authConfig['yves_system']['token'];
     $token->setRawToken($rawToken);
     $hash = $token->generate();
     $isAllowed = $this->authFacade->isAuthenticated($hash);
     $this->assertTrue($isAllowed);
 }
示例#2
0
 /**
  * @return void
  */
 public function testValidatePasswordWhenTokenProvidedNotSavedToDatabase()
 {
     $resetStatus = $this->authFacade->isValidPasswordResetToken('NERAMANES');
     $this->assertFalse($resetStatus);
 }