Neos\Flow\Tests\Unit\Security\Authentication\Provider\FileBasedSimpleKeyProviderTest::authenticationFailsWithWrongCredentialsInAPasswordToken PHP Method

authenticationFailsWithWrongCredentialsInAPasswordToken() public method

    public function authenticationFailsWithWrongCredentialsInAPasswordToken()
    {
        $this->mockToken->expects($this->once())->method('getCredentials')->will($this->returnValue(['password' => 'wrong password']));
        $this->mockToken->expects($this->once())->method('setAuthenticationStatus')->with(TokenInterface::WRONG_CREDENTIALS);
        $authenticationProvider = new FileBasedSimpleKeyProvider('myProvider', ['keyName' => 'testKey', 'authenticateRoles' => ['Neos.Flow:TestRoleIdentifier']]);
        $this->inject($authenticationProvider, 'policyService', $this->mockPolicyService);
        $this->inject($authenticationProvider, 'hashService', $this->mockHashService);
        $this->inject($authenticationProvider, 'fileBasedSimpleKeyService', $this->mockFileBasedSimpleKeyService);
        $authenticationProvider->authenticate($this->mockToken);
    }