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

authenticationIsSkippedIfNoCredentialsInAPasswordToken() public method

    public function authenticationIsSkippedIfNoCredentialsInAPasswordToken()
    {
        $this->mockToken->expects($this->once())->method('getCredentials')->will($this->returnValue([]));
        $this->mockToken->expects($this->once())->method('setAuthenticationStatus')->with(TokenInterface::NO_CREDENTIALS_GIVEN);
        $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);
    }